Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Podia.

Text transform – CSS

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.

Back to: CSS Reference > CSS Properties