The text-transform property controls how text is capitalized — uppercase, lowercase, capitalize each word, or leave it unchanged.
01
none
Default text.
02
capitalize
Title case.
03
uppercase
ALL CAPS.
04
lowercase
all small.
05
UI Labels
Buttons & nav.
06
Consistency
Normalize text.
Fundamentals
Introduction
The text-transform property in CSS allows you to control the capitalization of text. It can transform text to uppercase, lowercase, or capitalize each word, making it a versatile tool for text formatting in web design.
This property is useful for ensuring consistency in the appearance of text, regardless of how it is entered by users or stored in a database.
Definition and Usage
Use text-transform when you want visual capitalization without changing the HTML source — for example, making all button labels uppercase or title-casing navigation items from messy user input.
💡
Beginner Tip
text-transform changes how text looks, not what is stored. Screen readers and copy-paste may still use the original casing from your HTML.
Foundation
📝 Syntax
The syntax for the text-transform property is simple. It can be applied to any text element.
capitalize uppercases the first letter of each word, not every letter.
full-width exists for East Asian typography but has limited browser support.
The property is inherited; child elements follow the parent unless overridden.
Related Properties
font-variant — controls small-caps and other typographic variants
letter-spacing — often paired with uppercase labels for readability
text-decoration — adds underlines or lines through text
Defaults
🎯 Default Value
The default value of the text-transform property is none, which means the text is displayed as it is entered or stored.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Default value
none
All caps
text-transform: uppercase;
All lowercase
text-transform: lowercase;
Title case per word
text-transform: capitalize;
Reset transformation
text-transform: none;
Inherited
Yes
Reference
💎 Property Values
The text-transform property accepts keyword values that control capitalization style.
Value
Example
Description
none
text-transform: none;
No transformation is applied. The text is displayed normally.
capitalize
text-transform: capitalize;
Transforms the first character of each word to uppercase.
uppercase
text-transform: uppercase;
Transforms all characters to uppercase.
lowercase
text-transform: lowercase;
Transforms all characters to lowercase.
full-width
text-transform: full-width;
Transforms characters to their full-width form, typically used in East Asian typography (not supported in all browsers).
nonecapitalizeuppercaselowercase
Context
When to Use text-transform
text-transform helps keep typography consistent across your site:
Button labels — Apply uppercase for compact, bold CTAs.
Navigation menus — Use capitalize for readable menu items.
User content — Normalize inconsistent casing from forms or databases.
Metadata tags — Style category labels with lowercase for a subtle look.
Preview
👀 Live Preview
The same sentence with each text-transform value applied:
none hello world from css
capitalize hello world from css
uppercase hello world from css
lowercase HELLO WORLD FROM CSS
Hands-On
Examples Gallery
In this example, we’ll apply different text transformations to paragraphs.
📜 Basic Values
Compare none, capitalize, uppercase, and lowercase on the same page.
Example 1 — All text-transform values
In this example, we’ll apply different text transformations to paragraphs.
index.html
<style>.none{text-transform:none;}.capitalize{text-transform:capitalize;}.uppercase{text-transform:uppercase;}.lowercase{text-transform:lowercase;}</style><pclass="none">This text is not transformed.</p><pclass="capitalize">this text is capitalized.</p><pclass="uppercase">this text is uppercase.</p><pclass="lowercase">THIS TEXT IS LOWERCASE.</p>
Tags stored in ALL CAPS render as lowercase badges, keeping markup flexible while controlling presentation.
A11y
♿ Accessibility
Screen readers — May announce text using the original HTML casing, not the transformed visual form.
Avoid ALL CAPS for long text — Uppercase blocks of text are harder to read for many users.
Do not rely on casing alone — Use semantic HTML and labels; transformation is decorative.
Prefer proper source text — For important content, write correct casing in HTML when possible.
Companion
capitalize vs uppercase
capitalize only uppercases the first letter of each word. uppercase converts every character. Choose based on whether you need title case or full caps.
The browser reads text from HTML, CSS content, or user input.
Source
2
Transform rule applies
CSS applies uppercase, lowercase, or capitalize before painting.
Transform
3
Visual casing changes
Users see the transformed casing on screen while the DOM text stays the same.
Display
=
✅
Consistent typography
Mixed or messy source text displays with uniform capitalization.
Compatibility
Browser Compatibility
The text-transform property is widely supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. It works reliably across different platforms and devices, making it a dependable tool for text formatting.
✓ Universal · All modern browsers
Reliable text formatting
Chrome, Firefox, Safari, Edge, and Opera all support none, capitalize, uppercase, and lowercase.
99%Browser support
Google Chrome1+ · Desktop & Mobile
Full support
Mozilla Firefox1+ · Desktop & Mobile
Full support
Apple Safari1+ · macOS & iOS
Full support
Microsoft Edge12+ · All versions
Full support
Opera3.5+ · All versions
Full support
Testing tip
The full-width value has limited support. Stick to the four main keywords for production UI.
text-transform property99% supported
Bottom line:text-transform is safe to use for capitalization styling in all modern web projects.
Wrap Up
Conclusion
The text-transform property is a useful feature in CSS for controlling the capitalization and formatting of text on your web pages.
Whether you need to standardize the appearance of user-generated content or enhance the readability of your text, text-transform offers a straightforward solution. Experiment with different values to see how they can improve the look and feel of your text.
Use uppercase sparingly on short labels and buttons
Pair uppercase text with slightly increased letter-spacing
Use capitalize for title-style navigation items
Reset inherited transforms with text-transform: none; when needed
Write meaningful text in HTML for accessibility when possible
❌ Don’t
Uppercase entire paragraphs or articles
Assume screen readers will read transformed casing
Use capitalize when you need every letter capitalized
Depend on full-width for cross-browser layouts
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about text-transform
Use these points when controlling text capitalization in CSS.
5
Core concepts
📝01
Capitalization
Visual text casing.
Purpose
∅02
none
Default value.
Default
🔠03
uppercase
ALL CAPS.
Keyword
📝04
capitalize
Title case.
Keyword
🔗05
Inherited
Flows to children.
Cascade
❓ Frequently Asked Questions
text-transform controls the capitalization of text. You can display text as uppercase, lowercase, capitalize each word, or leave it unchanged with none.
The default is none, which means text is displayed exactly as written in the HTML or source content.
No. capitalize only uppercases the first character of each word. Use uppercase to make every letter capital.
Yes, text-transform is inherited. Setting it on a parent affects child text unless a child overrides it.
No. It is a visual presentation change only. The underlying HTML and copy-pasted text remain unchanged.