Coloring Text
This is the easy part! Text color uses the color: property, which, as you can see, does not have a font or text prefix.Chapter 8, "Working with Color and Images Using CSS," where I applied the color property in numerous cases and discussed color values at length.I want to color up the text a bit, so I'm going to apply color to my existing styles (see Example 9-4).
Example 9-4. Coloring the text
You can see the headers change color in Figure 9-7.
body {font-family: Georgia, Times, serif; font-size: 1em; font-weight: normal; color: black;}
h1, h2 {font-family: Arial, Helvetica, sans-serif;}
h1 {font-size: 150%; font-weight: bold; color: #999;}
h2 {font-size: 130%; font-weight: lighter; font-style: italic; color: #333;}
.accent {font-weight: 700; color: red;}
Figure 9-7. Applying color to the body, H1, h2, and class selectors.
[View full size image]
