Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

text-transform — transforming text presentation

The text-transform property changes how letters and selected characters are displayed without changing source text. It is inherited, and its initial value is none.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

text-transform: none | [ capitalize | uppercase | lowercase ] || full-width || full-size-kana | math-auto;

text-transform provides presentational transformations. uppercase produces uppercase letters, lowercase lowercase letters, and capitalize titlecases the first letter of each word while leaving other letters unchanged. none disables transformation, including an inherited transformation.

capitalize does not implement editorial title-casing rules; word boundaries depend on the browser. Case mappings account for language, so set lang accurately.

full-width selects full-width character equivalents where available; full-size-kana converts small kana to full-size kana. These can be combined with one case transformation. Processing order is case, width, then kana. math-auto is a separate value for the transformation defined in MathML Core. This syntax comes from the specification; it does not confirm support for every value in the target browser.

Do not use this property to correct meaning or source data: transformations can distort meaning. According to the specification, copying as plain text must not incorporate the transformation.

Examples

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>text-transform</title>
<style>
  p { text-transform: uppercase; }
  span { text-transform: none; }
</style>
<p>Hello <span>CSS</span> world!</p>
</html>

Result

HELLO CSS WORLD!

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources