Easy Tutorial
❮ Jsref Length String Met Tablerow Insertcell ❯

Style color Attribute


Definition and Usage

The color attribute sets or returns the color of the text.

Syntax

Set the color attribute:

Return the color attribute:

Value Description
color Specifies the color of the text. In CSS Color Values
inherit The value of the color attribute is inherited from the parent element.

Browser Support

All major browsers support the color attribute.

Note: IE7 and earlier versions do not support the "inherit" value. IE8 only supports "inherit" if the !DOCTYPE is specified. IE9 supports "inherit".


Example

Change the color of the text:


❮ Jsref Length String Met Tablerow Insertcell ❯