text-transform

Specifies how to capitalize an element’s text.

Syntax

text-transform: <value>;

The following values can be be appplied to the text-transform property:

  • none (default): The text renders as is.
  • capitalize: Transforms the first character of every word to uppercase.
  • uppercase: Transforms all characters to uppercase.
  • lowercase: Transforms all characters to lowercase.

Example 1

Transforming every character of a text block to uppercase.

p {
text-transform: uppercase;
}

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn CSS on Codecademy