Style textTransform property
The Style object
Definition and Usage
The textTransform property sets or returns the capitalization of text.
Syntax
Set the textTransform property:
Object.style.textTransform="none|capitalize|uppercase|lowercase|inherit"
Return the textTransform property:
Object.style.textTransform
| Value | Description |
|---|---|
| none | Default. No characters are converted. |
| capitalize | The first character of each word is converted to uppercase. |
| uppercase | All characters are converted to uppercase. |
| lowercase | All characters are converted to lowercase. |
| inherit | The value of the textTransform property is inherited from the parent element. |
Browser support





All major browsers support the textTransform property.
**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".
Example
Example
Convert the first letter of each word to uppercase:
This is some text.
Try it »
The Style object