The background-color property defines the background color for an element:
Code:
<html>
<body style="background-color:yellow;">
<h2 style="background-color:red;">This is a heading</h2>
<p style="background-color:green;">This is a paragraph.</p>
</body>
</html>
The font-family, color, and font-size properties defines the font, color, and size of the text in an element:
Code:
<html>
<body>
<h1 style="font-family:verdana;">A heading</h1>
<p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p>
</body>
</html>
The font-family, color, and font-size properties make the old <font> tag obsolete.
Example Page
http://learnhtml.bizhat.com/example_003.html
Source Code
http://learnhtml.bizhat.com/example_003.html.txt
Bookmarks