Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style textTransform property

Style textTransform property

Style Object Reference 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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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:

Runoob Tutorial(runoob.com)

This is some text.


Try it »


Style Object Reference The Style object