CSS Text Transformation
CSS Text Transformation
The CSS
text-transform
property is used to
control the capitalization of text in an element.
It can be used to transform a text into uppercase or lowercase letters, or capitalize the first letter of each word, without changing the original content in HTML.
This property can have one of the following values:
none
- No transformation. Text renders as it iscapitalize
- Transforms the first character of each word to uppercaseuppercase
- Transforms all characters to uppercaselowercase
- Transforms all characters to lowercase
Example
Demonstration of the text-transform property:
p.uppercase {
text-transform: uppercase;
}
p.lowercase {
text-transform: lowercase;
}
p.capitalize {
text-transform: capitalize;
}
Try it Yourself »
The CSS Text Transformation Property
Property | Description |
---|---|
text-transform | Controls the capitalization of text |