Transform text in different elements:
h2 {text-transform:capitalize;}
p {text-transform:lowercase;}
Try it out . . .
Description of property definition and use
The text-transform property controls the case of the text.
Default: | none |
---|---|
Inherited: | yes |
Version: | CSS1 |
JavaScript syntax: | object .style.textTransform="uppercase" |
Browser support
The numbers in the table support the first browser version number of the property.
The number immediately before -webkit-, -ms- or -moz- is the first browser version number that supports the prefix property.
Attributes | |||||
---|---|---|---|---|---|
animation-duration |
43.0
3.0 -webkit- |
10.0 |
16.0
5.0 -moz- |
9.0
4.0 -webkit- |
30.0
15.0 -webkit- 12.0 -o- |
The property value
Value | Describe |
---|---|
none | Default. Define standard text with lowercase and capital letters. |
capitalize | Each word in the text begins with a capital letter. |
uppercase | Definitions are only capital letters. |
lowercase | Definitions have no capital letters, only lowercase letters. |
inherit | Specifies that the value of the text-transform property should be inherited from the parent element. |