Javascript Reference
Categories: STYLE

javascript STYLE textTransform

@March 15, 2008, 1:22 a.m.
textTransformFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

Read/Write  

Controls the capitalization of the element's text. When a value other than none is assigned to this attribute, the cases of all letters in the source text are arranged by the style sheet, overriding the case of the source text characters.

 
Example
 
document.getElementById("heading").style.textTransform = "capitalize";
 
Value

A value of none allows the case of the source text to be rendered as is. Other available constant values (as strings) are: capitalize | lowercase | uppercase. A value of capitalize sets the first character of every word to uppercase. Values lowercase and uppercase render all characters of the element text in their respective cases.

 
Default

none


Powered by Linode.