CSS text-transform Property


Transform text in different <p> elements:

p.uppercase {
    text-transform: uppercase;

p.lowercase {
    text-transform: lowercase;

p.capitalize {
    text-transform: capitalize;

Try it yourself »

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" Try it

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

text-transform 1.0 4.0 1.0 1.0 7.0 

CSS Syntax

text-transform: none|capitalize|uppercase|lowercase|initial|inherit;

Property Values

Value Description Play it
none No capitalization. The text renders as it is. This is default Play it »
capitalize Transforms the first character of each word to uppercase Play it »
uppercase Transforms all characters to uppercase Play it »
lowercase Transforms all characters to lowercase Play it »
initial Sets this property to its default value. Read about initial Play it »
inherit Inherits this property from its parent element. Read about inherit

Related Pages

CSS tutorial: CSS Text

HTML DOM reference: textTransform property




Search w3schools.com:

Translate w3schools.com: