The Complete CSS Uppercase Interactive Tutorial

When people say “make it uppercase with CSS”, they almost always mean one thing: text-transform.

In this tutorial, you’ll learn how to do uppercase text, lowercase text, “first letter only” styles, and the small-caps look (which is a font feature, not a transformation).

CSS uppercase property: what it actually is

There is no property literally named “uppercase” in CSS. The property you want is: text-transform.

  • text-transform: uppercase; makes letters display as uppercase.
  • text-transform: lowercase; makes letters display as lowercase.
  • text-transform: capitalize; makes the first letter of each word uppercase.
  • text-transform: none; turns transformations off.

Important detail: this changes the display of the text, not the underlying HTML text value. That matters for things like copy/paste and screen readers (we’ll cover that later).

text-transform: the core of CSS uppercase

Let’s start with a playground where you can flip between the main values of text-transform.

text-transform:


.demo-text {
text-transform: none;
} 


*,
::before,
::after {
box-sizing: border-box;
}

.wrapper {
font-family: system-ui, Arial, sans-serif;
padding: 18px;
max-width: 760px;
}

.demo-box {
border: 3px solid #111;
border-radius: 14px;
padding: 14px;
background: #f4f4f4;
}

.demo-text {
font-size: 22px;
letter-spacing: 0.02em;
margin: 0 0 10px;
}

.hint {
margin: 0;
opacity: 0.85;
font-size: 14px;
} 


CSS is fun... until you forget a semicolon

iPhone vs android vs “my toaster has bluetooth”

déjà vu, crème brûlée, jalapeño

Try switching between values above. Notice how accents stay, but the casing changes.

uppercase vs capitalize

uppercase affects every letter. capitalize affects the first letter of each word.

“Capitalize” is not the same as “first letter only”, and it’s also not “proper title case”. It’s simple: each word gets its first letter uppercased.

CSS uppercase text: common UI uses

Uppercase is often used for labels, buttons, tabs, and tiny headings. A small trick: uppercase text can look cramped, so designers often add a little letter spacing.



.tag {
text-transform: uppercase;
letter-spacing: 0.12em;
font-size: 1rem;
} 


*,
::before,
::after {
box-sizing: border-box;
}

.demo-ui {
font-family: system-ui, Arial, sans-serif;
padding: 18px;
max-width: 780px;
}

.panel {
border: 3px solid #111;
border-radius: 16px;
padding: 16px;
background: #f7f7f7;
display: grid;
gap: 12px;
}

.tag {
display: inline-block;
padding: 10px 12px;
border: 2px solid #111;
border-radius: 999px;
background: #fff;
}

.row {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.note {
margin: 0;
opacity: 0.85;
font-size: 14px;
} 


New Featured Limited offer Read more

Slide letter spacing and font size. Uppercase often needs breathing room.

CSS uppercase letters: does it change the HTML?

No. text-transform doesn’t rewrite your HTML text content. It changes how it renders.

  • Copy/paste may copy the original text (browser behavior can vary).
  • Screen readers often read the original text, not “S P E L L I N G” style letters.
  • Your source text should still be written normally (more on accessibility later).

CSS uppercase lowercase: mixing and overriding

A very common pattern is to force a whole component to one case, then override a piece. For example: a button where the main label is uppercase, but a small helper text stays normal.

.button {
  text-transform: uppercase;
}

.button .meta {
text-transform: none;
} 


*,
::before,
::after {
box-sizing: border-box;
}

.wrap {
font-family: system-ui, Arial, sans-serif;
padding: 18px;
max-width: 800px;
}

.button {
border: 3px solid #111;
border-radius: 16px;
background: #fff;
padding: 14px 16px;
display: grid;
gap: 6px;
width: min(520px, 100%);
}

.button .label {
font-size: 18px;
letter-spacing: 0.08em;
}

.button .meta {
font-size: 14px;
opacity: 0.8;
letter-spacing: 0;
}

kbd {
font-family: ui-monospace, SFMono-Regular, Menlo;
border: 2px solid #111;
border-radius: 8px;
padding: 2px 6px;
background: #f2f2f2;
} 


Save changes
Shortcut: S

Tip: scope transform to avoid accidental uppercase

If you put text-transform: uppercase; too far up (like on a big container), you might uppercase things you didn’t mean to: code snippets, brand names, product IDs, or email addresses. Prefer targeting the specific element that should be uppercase (like a label).

CSS uppercase first letter only

People mean two different things when they say “first letter only”:

  1. Capitalize each word (title-ish look) using text-transform: capitalize;
  2. Uppercase only the first character of the entire element using ::first-letter

Option 1: capitalize (first letter of each word)

This is the “quick and cheerful” option. Great for labels or simple titles.

.title {
  text-transform: capitalize;
}
    


*,
::before,
::after {
box-sizing: border-box;
}

.stage {
font-family: system-ui, Arial, sans-serif;
padding: 18px;
max-width: 800px;
}

.card {
border: 3px solid #111;
border-radius: 16px;
padding: 16px;
background: #f6f6f6;
display: grid;
gap: 10px;
}

.title {
margin: 0;
font-size: 22px;
}

.small {
margin: 0;
opacity: 0.8;
font-size: 14px;
} 


the complete css uppercase interactive tutorial

welcome to the internet: please keep your arms inside the browser

Capitalize affects each word. It does not guarantee “proper” title case.

Option 2: true “first letter only” with ::first-letter

If you want only the first character of an element uppercased (and nothing else), use ::first-letter.

You can combine it with text-transform: lowercase; on the whole element to force a consistent look:

.lede {
  text-transform: lowercase;
}

.lede::first-letter {
text-transform: uppercase;
} 


*,
::before,
::after {
box-sizing: border-box;
}

.page {
font-family: system-ui, Arial, sans-serif;
padding: 18px;
max-width: 820px;
}

.box {
border: 3px solid #111;
border-radius: 16px;
background: #ffffff;
padding: 16px;
}

.lede {
margin: 0;
font-size: 20px;
line-height: 1.35;
}

.tip {
margin: 12px 0 0;
font-size: 14px;
opacity: 0.85;
} 


tHIS paragraph gets normalized: first character uppercase, the rest lowercase.

wATCH how this works even if the original text is messy.

This is “first letter only” for the whole element, not each word.

Switch to the HTML tab to see the original text.

::first-letter gotchas

  • ::first-letter targets the first “typographic letter” of the element. If the first character is punctuation or a quote, behavior can vary.
  • It works best when the element begins with normal text (not a nested element).
  • It’s for styling, not content correctness. Don’t rely on it to fix real capitalization rules in languages.

Learn more about pseudo-elements such as ::first-letter in the CSS Pseudo Elements Interactive Tutorial.

CSS uppercase font: small caps

Sometimes people ask for “uppercase font” when what they really want is the small caps look: letters appear as capital shapes, but the original lowercase letters become smaller capitals.

That’s not text-transform. It’s a font feature, controlled with: font-variant-caps.

Common values you’ll see:

  • small-caps: use small caps if the font supports it.
  • all-small-caps: tries to render everything as small caps.
  • normal: turns it off.
font-variant-caps:


.sample {
font-variant-caps: normal;
} 


*,
::before,
::after {
box-sizing: border-box;
}

.shell {
font-family: Georgia, "Times New Roman", serif;
padding: 18px;
max-width: 820px;
}

.panel {
border: 3px solid #111;
border-radius: 16px;
padding: 16px;
background: #f6f6f6;
display: grid;
gap: 10px;
}

.sample {
margin: 0;
font-size: 22px;
line-height: 1.25;
}

.help {
margin: 0;
font-family: system-ui, Arial, sans-serif;
font-size: 14px;
opacity: 0.85;
} 


Small caps can look classy, like a book title.

But support depends on the font.

Switch values. If your font lacks true small caps, the browser may fake it.

Small caps vs uppercase

These are different tools:

  • Uppercase (text-transform: uppercase;) changes the letter casing.
  • Small caps (font-variant-caps) changes how letters are drawn.

You can even combine them, but in many designs it’s overkill. Pick the one that matches the intent: “shouty label” (uppercase) vs “typographic vibe” (small caps).

CSS uppercase all letters (and keeping it readable)

Uppercase all letters is simple: text-transform: uppercase;. The tricky part is making it pleasant to read.

  • Increase letter spacing a bit (often between 0.04em and 0.14em).
  • Consider font weight: lighter weights can look elegant; heavy weights can look loud.
  • Be careful with long sentences: uppercase slows reading speed for many people.


.headline {
text-transform: uppercase;
letter-spacing: 0.08em;
font-weight: 600;
} 


*,
::before,
::after {
box-sizing: border-box;
}

.area {
font-family: system-ui, Arial, sans-serif;
padding: 18px;
max-width: 880px;
}

.block {
border: 3px solid #111;
border-radius: 18px;
padding: 18px;
background: #f4f4f4;
display: grid;
gap: 10px;
}

.headline {
margin: 0;
font-size: 26px;
line-height: 1.1;
}

.body {
margin: 0;
font-size: 16px;
line-height: 1.45;
opacity: 0.9;
} 


Shipping update

Uppercase is great for short headings. For paragraphs, it’s usually a “no thanks”.

Real-world notes: accessibility, copy/paste, and localization

Accessibility: don’t write your HTML in ALL CAPS

Write your content in normal case in HTML (the way a human would type it), and use CSS to style it. This keeps your content flexible and avoids weird edge cases.

  • Screen readers generally handle text-transform fine, but ALL CAPS source text can be annoying in some contexts.
  • Users may copy text from your UI. If you store content in ALL CAPS, it stays ALL CAPS everywhere.

Localization: case rules aren’t universal

Different languages have different casing rules. CSS can’t perfectly “understand language” in every scenario. If you need truly correct title casing or special casing rules, do it at the content level (server-side or JS), and use CSS for styling—not as a grammar engine.

text-transform doesn’t change data

If you need the transformed value for actual data (export, search, storage), CSS won’t help. CSS is presentation.

CSS uppercase not working: debugging checklist

  1. Are you applying it to the right element?

    If the text is inside a child element, apply text-transform to that child (or ensure it inherits).

  2. Is another rule overriding it?

    Check the cascade: a more specific selector might be setting text-transform: none;.

    Learn more about the CSS cascade in the CSS Cascade Interactive Tutorial, and about specificity in the CSS Specificity Interactive Tutorial.

  3. Are you expecting it to affect non-letters?

    Symbols and numbers don’t have uppercase/lowercase forms.

  4. Are you mixing it with small caps?

    Remember: small caps is font-variant-caps, not text-transform. They do different things.

  5. Is it actually a font issue?

    If you’re trying to get the “small caps” look, your chosen font may not support true small caps.

Quick reference

  • Uppercase all letters: text-transform: uppercase;
  • Lowercase all letters: text-transform: lowercase;
  • Capitalize each word: text-transform: capitalize;
  • Disable transforms: text-transform: none;
  • First character only: ::first-letter { text-transform: uppercase; }
  • Small caps look: font-variant-caps: small-caps;

CSS Uppercase conclusion

CSS gives you powerful tools to control text case and styling, but it’s important to understand the difference between transforming text (with text-transform) and changing how letters are drawn (with font-variant-caps). Use the right tool for your design goals, and remember to keep accessibility and readability in mind. Happy styling!