Tag text-transform

The text-transform property lets you easily change the case of text: uppercase, lowercase, capitalize each word, and more — without changing the actual HTML content.


🔹 What Does text-transform Do?

It modifies the visual presentation of text by changing its capitalization — great for styling headings, labels, buttons, or formal content.


📘 Syntax

selector {
text-transform: none | uppercase | lowercase | capitalize | full-width | full-size-kana;
}

💡 Common Values

ValueWhat It DoesExample Output
noneNo transformationText remains as typed
uppercaseConverts all characters to uppercaseHELLO WORLD
lowercaseConverts all characters to lowercasehello world
capitalizeCapitalizes the first letter of each wordHello World
full-widthTransforms Latin letters into full-width formHELLO WORLD (mostly for CJK typesetting)
full-size-kanaTransforms half-width katakana to full-size (Japanese)カタカナ → カタカナ (for Japanese layout)

✍️ Example: Uppercase Button Text

<button class="btn-uppercase">Submit</button>
.btn-uppercase {
text-transform: uppercase;
}

✅ Displays: SUBMIT


✍️ Example: Capitalized Headings

h2 {
text-transform: capitalize;
}

✅ Displays: The Quick Brown Fox (even if the text was typed in all lowercase).


🖼️ Image Idea: Visual Demo of Each text-transform

Image Description:
Same sentence shown in six styles:

  1. Normal
  2. uppercase
  3. lowercase
  4. capitalize
  5. full-width
  6. full-size-kana

🎯 Purpose: Show how each value changes the text’s appearance.


🧠 Best Use Cases

Use CaseSuggested Value
Navigation menu labelsuppercase
Form placeholders or buttonsuppercase or capitalize
Blog headings or titlescapitalize
Localized web typographyfull-width / full-size-kana (for CJK content)

✅ Summary

Propertytext-transform
PurposeChanges text capitalization
Common valuesuppercaselowercasecapitalize
Special valuesfull-widthfull-size-kana
Works onAny inline or block-level text elements

⚠️ Notes & Tips

  • It doesn’t affect HTML source text — only visual output.
  • Not suitable for proper nouns or acronyms that require manual control.
  • Combine with letter-spacing for stylized uppercase headers.
.upper-title {
text-transform: uppercase;
letter-spacing: 0.1em;
}

🔚 Final Thought

The text-transform property is a fast, clean, and semantic way to style capitalization without modifying your content. It’s an essential tool in any web designer’s typography toolbox.