CSS3/Color/color

From W3C Wiki

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


  • 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.