CSS3/Color/color
color
The color property describes the foreground color of an element's text content.
Description
Values | <color> | inherit |
---|---|
Initial value | Depends on user agent |
Applies to | All elements |
Inherited | Yes |
Values
<color>
Color units are defined in a <color> Values section.
inherit
Takes the same specified value as the property for the element's parent.
Example
Example A
[style.css]
body { color: #fff; background-color: #666; }
[index.html]
<body> <h1>CSS color property example</h1> </body>
CSS Reference
The CSS Color Module Level 3 specification defines the color property in 3.1. Foreground color: the ‘color’ property.