CSS text-transform property
Examples
Convert between different elements of the text:
h1 {text-transform: uppercase;}
h2 {text-transform: capitalize;}
p {text-transform: lowercase;}
h2 {text-transform: capitalize;}
p {text-transform: lowercase;}
Attribute definitions and instructions
Text-transform property controls the capitalization of text.
Defaults: | none |
---|---|
inherit: | yes |
version: | CSS1 |
JavaScript syntax: | object .style.textTransform = "uppercase" |
Browser Support
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
text-transform | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Property Value
value | description |
---|---|
none | default. Defined text with lowercase and uppercase letters standards. |
capitalize | Text each word with a capital letter. |
uppercase | Defined only capital letters. |
lowercase | No definition of uppercase letters, lowercase letters only. |
inherit | Provisions should inherit values text-transform property from a parent element. |
related articles
CSS tutorial: CSS the Text