The text-transform
property is used in CSS and some HTML elements. This property specifies capitalization and lowercase effects which should be rendered on the selected text.
Values[]
capitalize
- The first letter on each word is capitalized and the other letters are unaffected.uppercase
- All letters are converted to uppercase.lowercase
- All letters are converted to lowercase.none
- No case change effects.
To apply this in HTML, use:
<span style="text-transform:capitalize;">capitalized text.</span>
That produces: Capitalized text.
Text using the uppercase
value: All-caps text.
Text using the lowercase
value: Lowercase text.
To apply this in CSS, in the h1
element for example, use:
h1 { text-transform:capitalize; }