Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

text-transform

Changes the case of letters on display.

Syntax

text-transform: value;

Values

ParameterTypeDescription
uppercasekeywordALL CAPITALS.
lowercasekeywordall lowercase.
capitalizekeywordThe First Letter Of Each Word.
nonekeywordAs written in the HTML.

Examples

Three transformations:

<p style="text-transform: uppercase;">uppercase letters</p>
<p style="text-transform: lowercase;">LOWERCASE LETTERS</p>
<p style="text-transform: capitalize;">every word capitalized</p>

Notes

The text in the HTML stays unchanged: it is copied and read by screen readers as written. So write headings normally and make them capitals with CSS.

See also

Related recipes

In the tutorial

  • Text and fonts — Font family, size, weight, italics, line height, alignment and text decoration, plus loading your own font.

Thanks for reading!

Donate to the site — we work hard for you.