Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

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:

  1. em {color: red}
  2. em {color: rgb(255,0,0)}
  3. em {color: #f00}
  4. em {color: #ff0000}
  5. 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