color
Definition
The color property specifies the foreground color of an element's text content.
Example
This example shows different ways to specify the color red:
em {color: red}em {color: rgb(255,0,0)}em {color: #f00}em {color: #ff0000}em {color: rgb(100%, 0%, 0%)}
Characteristics
Possible values
- color
- Color name or value.
inherit- Use the same computed value as the parent element for this property.
Default value
Depends on Web browser
Applies to
All elements
Inherited
Yes
See also