Font colors in styles are set with the
color property. For example, this style rule (in a
STYLE tag or in a style sheet file) says that all
<STRONG> elements should have a font color of red:
So when we use the
I feel <STRONG>very strongly</STRONG> about this.
we get this:
I feel very strongly about this.
Remember that it's
font-color. All the other font related properties begin with the word
font. This is the exception.
Color expressions for
color work the same as for HTML color attributes. You can either give the name of a color, or a red-green-blue expression. For example, this code creates a
preppy where the fonts are hot pink:
#FF3399. Notice that the RGB color code is preceded by a pound
#) sign just like in HTML:
We can then apply the
preppy class to a
<SPAN ...> element:
I'm feelin' <SPAN CLASS="preppy">fiiiiiiine</SPAN>.
which gives us
I'm feelin' fiiiiiiine.