Javascript Reference
Categories: STYLE

javascript STYLE color

@Aug. 15, 2009, 12:40 p.m.
color Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

 

Read/Write  

Sets the foreground (text) color style sheet attribute 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.

 
Example
 
document.getElementById("specialDiv").style.color = "green";
 
Value

Case-insensitive CSS color specification.

 
Default

black


Powered by Linode.