Aabestfontgenerator.
THE TYPE NOTEBOOK

CSS Uppercase: Style Labels Without Changing Stored Text

Use CSS text-transform for uppercase labels, test language-specific casing and keep the original text available.

Use CSS text-transform for uppercase labels, test language-specific casing and keep the original text available.

Sources reviewed .

01

Apply uppercase to a defined text role

Set text-transform: uppercase on the selector for a label or short heading. Keep a sentence-case source string and proof the result in its actual width. Compare the longest label against the shortest and check that it still fits when the user enlarges the text.

02

Declare the text’s language

Case conversion can depend on language. For example, Turkish uses distinct uppercase forms for dotted and dotless i. Set the relevant lang attribute and proof a real translated label in the browser. Use the stored wording to make any editorial change to the actual name or sentence.

03

Choose an appearance change or a text conversion

Use CSS when the effect belongs to your webpage. If an exported document or submitted value must contain uppercase characters, transform the text where you prepare the data. See the all-caps typography guide for capital styles and the Unicode text guide for the distinction between appearance and characters. For a separate decorative caption, try the homepage’s copyable capital-letter styles.

GOOD QUESTIONS

Your questions, answered.

Which CSS declaration makes text appear uppercase?

Use text-transform: uppercase on the element you intend to style.

Does CSS uppercase rewrite the stored label?

It controls presentation in the browser. Keep or change the underlying characters separately according to how the label is stored or exported.

Sources & background

Sources supporting this page’s explanations. Practical examples are our editorial suggestions.