colorNN 4 IE 4 CSS 1

Inherited: Yes

Defines the foreground text color of the element. For some graphically oriented elements, such as form controls, the color attribute may also be applied to element edges or other features. Such extracurricular behavior is browser-specific and may not be the same across browsers.

 
CSS Syntax
 
color: color
 
Value

See the discussion of color attribute values at the beginning of this chapter.

 
Initial Value

black

 
Example
 
th {color: darkred}
 
Applies To

All elements.

 
Object Model Reference
 
[window.]document.getElementById("elementID").style.color