Demo
Summary
To change the capitalization of an element’s text using CSS, use the text-transform
property:
selector {
/* uppercase | lowercase | capitalize | none */
text-transform: uppercase;
}
Details
You can use the following values: uppercase
, lowercase
, capitalize
, and none
.
The uppercase
value makes all of the letters uppercase.
The lowercase
value makes all of the letters lowercase.
The capitalize
value makes the first letter of each word capitalized.
The none
value does not alter the capitalization of the element(s).
Exercises
First, recreate the CSS code from the Demo section in your CSS file. Then try changing the value for the property.