Extensible HyperText Markup Language

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

XStandard XHTML WYSIWYG editor
A standards-compliant WYSIWYG editor component for content management applications. The editor generates valid XHTML and uses CSS for formatting. Free version is available.

Check out XStandard