Styling HTML Text Without CSS

Styling html text without CSS

Add CSS as a style directly to the tag you want to format.

EX.

<p style="width:20px;height:20px;background-color:#ffcc00;">The contents go here</p>

Styling Text without HTML Tag?

Plain text is contained within an element: the body element:

<body>
Hello, world!
</body>

Because of this, you could style this text by simply styling the body element:

body {
color: red;
text-decoration: underline;
}

Depending on the context though, CSS3 does provide two pseudo-element selectors which could be used for this: :first-line and :first-letter.

To style the "H" you could simply use:

body:first-letter {
font-size: 32px;
}

If there was a <br> element separating your first line from another line, you could also make use of :first-line:

<body>
Hello, world!<br>
Second line.
</body>
body:first-line {
font-style: italic;
}

JSFiddle demo.

Can i change the text color of a tag without css?

What you could do is use the old and deprecated font tag. So it would be:

<tr><td><a href="#"><font color="black"> Link 3 </font></a></td></tr>

How do I style a HTML link without CSS?

You can only set the color.

<body link="XXX" alink="YYY" vlink="ZZZ"> 

XXX being the color used for links, YYY the color when mouse hovers the link and ZZZ the color for already visited links. Color can be given in hex notation just like with stylesheets

#AABBCC

You cannot set whether links are underlined or not, or have a border or not. This is totally up to the browser... unless these devices have some special, secret non-standard HTML.



Related Topics



Leave a reply



Submit