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

CSS text-transform property

CSS text-transform property

Example

Transform the text in different elements:

h1 {text-transform:uppercase;}

h2 {text-transform:capitalize;}

p {text-transform:lowercase;}

Try it »


Property definition and usage

The text-transform property controls the capitalization of text.

Default value: none
Inherited: yes
Version: CSS1
JavaScript syntax: object.style.textTransform="uppercase"

Browser support

The numbers in the table indicate the first browser version that supports this property.

property
text-transform 1.0 4.0 1.0 1.0 7.0

Attribute values

Value Description
none Default. Defines standard text with both lowercase and uppercase letters.
capitalize Each word in the text begins with an uppercase letter.
uppercase Defines uppercase letters only.
lowercase Defines no uppercase letters, only lowercase letters.
inherit Specifies that the value of the text-transform property should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Text