Syntax: | color : value |
---|---|
Initial Value : | Determined by browser |
Applies to: | All elements |
Inherited : | Yes |
The color property allows authors to specify the color of an element. See the CSS Units page for color value descriptions and the color reference page for a list of colors you can use. Some example color rules include:
Example:
H1 { color: red }
P { color: #0000A0 }
H4 { color: #008040 }
see example in action
To help avoid conflicts with user style sheets, background and color properties should always be specified together.