Transform text in different <p> elements:
The text-transform property controls the capitalization of text.
Default value: | none |
---|---|
Inherited: | yes |
Version: | CSS1 |
JavaScript syntax: | object.style.textTransform="uppercase" Try it |
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
text-transform | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
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 |
CSS tutorial: CSS Text
HTML DOM reference: textTransform property