CSS Color Property

CSS 1

CSS 2

CSS 3

Yes Yes Yes

Description

Specifies the foreground color of the element, which means the color of the text.

Syntax

color: [value];

Possible values

  • auto
  • [color]
  • inherit

Initial Value

Depends on the user agent. For example, your browser sets its own default colors for different elements.

Applies To

All elements

Inherited

Yes

Media

Visual

Example

p {background-color: inherit; color: #0000FF;}


View All CSS Properties