CSS font-variant Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The font-variant property is a shorthand for typographic variants in a font — most famously small-caps, plus ligatures, numeric forms, and related OpenType features.

It sets longhands such as font-variant-caps, font-variant-ligatures, and font-variant-numeric. For beginners, start with small-caps. You can also set normal or small-caps through the font shorthand.

Baseline · Widely available.

Not deprecated and not experimental. Advanced keywords only show their full effect when the active font includes those OpenType features.

CSS Syntax

syntax.css
font-variant: normal | none | small-caps | [ <variant-values> ]# | initial | inherit;

The initial value is normal. Space-separated values can combine caps, ligatures, numerics, and other variant keywords.

Property Values

ValueDescriptionTry it
small-capsLowercase letters become smaller capitalsTry it
normalNo special variants. Initial valueTry it
all-small-capsUppercase and lowercase use small-cap styleTry it
noneTurns ligatures off; other longhands stay normalTry it
initialResets to normalTry it
inheritUses the parent’s font-variantTry it

Other common keywords (font-dependent): petite-caps, unicase, titling-caps, tabular-nums, oldstyle-nums, common-ligatures.

How to Use font-variant

Start with small-caps, then explore longhands when you need finer control.

  1. Choose a readable font-family (serif faces often show small-caps clearly).
  2. Set font-variant: small-caps; on headings, labels, or short phrases.
  3. Compare with all-small-caps if you want uppercase letters shrunk too.
  4. For only capital variants, prefer the font-variant-caps longhand.
PieceRequired?Role
Text contentYesMixed case shows small-caps best
Variant keywordYessmall-caps, normal, and other values
Supporting fontRecommendedTrue small-cap glyphs look better than synthesized ones
LonghandsOptionalUse when you need only caps, ligatures, or numerics

Live Preview

Change only font-variant on the sample. Watch how lowercase and uppercase behave differently.

With small-caps, “CSS” stays tall while “typography” becomes smaller capitals.

Sample

CSS Typography Looks Like This

font-variant: small-caps

CSS Examples

Each snippet focuses on font-variant. Use Try It Yourself for a live editor.

Example 1 — Small Caps

Turn lowercase letters into smaller capitals; leave full caps tall.

CSS
<style>
  p {
    font-family: Georgia, serif;
    font-variant: small-caps;
  }
</style>

<p>CSS Typography</p>
Try It Yourself

How It Works

  1. Pick a clear face. Georgia shows capital shapes well.
  2. Request small caps. font-variant: small-caps maps lowercase to smaller capitals.
  3. Watch mixed case. CSS stays full height; typography shrinks.
  4. Shorthand note. This is the classic beginner use of the property.

Example 2 — All Small Caps

Shrink uppercase letters too for a uniform small-cap look.

CSS
<style>
  p {
    font-family: Georgia, serif;
    font-variant: all-small-caps;
  }
</style>

<p>CSS Typography</p>
Try It Yourself

How It Works

  1. Same text, different rule. Compare with Example 1.
  2. Include uppercase. all-small-caps also converts CSS into small-cap glyphs.
  3. Even height. The whole line looks like matching small capitals.
  4. Longhand twin. Same idea lives on font-variant-caps.

Example 3 — Reset to Normal

Turn variants off inside a small-caps parent.

CSS
<style>
  p { font-variant: small-caps; }
  span { font-variant: normal; }
</style>

<p>Small caps with a <span>normal</span> word.</p>
Try It Yourself

How It Works

  1. Inherit first. The paragraph sets small-caps for its children.
  2. Override locally. font-variant: normal restores standard letterforms on the span.
  3. Useful pattern. Keep a brand word or acronym in regular case inside a small-caps line.
  4. Initial value. normal is also what initial restores to.

Edge Cases & Pitfalls

If small-caps look odd or missing, check these first.

font

Not every font has true small caps

Browsers may synthesize smaller capitals from uppercase. True OpenType small-cap glyphs look cleaner when the font provides them.

shorthand

font only allows small-caps

Inside the font shorthand, the only non-normal variant value is small-caps. Other keywords belong on font-variant itself.

reset

Shorthand resets sibling longhands

Setting font-variant: small-caps can reset ligature or numeric longhands to their defaults. Set longhands after the shorthand if you need both.

none

none is not the same as normal

none turns ligatures off. normal leaves each longhand at its initial normal setting, which may still allow default ligatures.

a11y

Keep body copy readable

Small-caps work best for short labels and headings. Long paragraphs in small-caps are harder to scan.

Browser Support

font-variant is a browser CSS shorthand for typographic variants. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

font-variant

normal and small-caps work across modern browsers and Internet Explorer. Advanced OpenType keywords need supporting fonts.

98% Modern browser support
Google Chrome All
Full support
Mozilla Firefox All
Full support
Apple Safari All
Full support
Microsoft Edge All
Full support
Opera All
Full support
Samsung Internet All
Full support
Internet Explorer All (core values)
Full support
font-variant Widely supported

Bottom line: Safe for normal and small-caps everywhere. Treat advanced numeric/ligature keywords as progressive enhancement. It is not a runtime API.

Key Takeaways

  • Role: shorthand for caps, ligatures, numerics, and related variants.
  • Starter value: small-caps for lowercase as smaller capitals.
  • Longhands: use font-variant-caps when you only need capital variants.
  • Initial value: normal. Inherited by default.

One line: font-variant: small-caps; turns lowercase into smaller capitals.

Frequently Asked Questions

It is a shorthand for typographic OpenType-style variants such as small capitals, ligatures, numeric forms, and more. The most common beginner value is small-caps.
The initial value is normal, which means each related longhand uses its normal setting and no special variant is forced.
small-caps displays lowercase letters as smaller capital glyphs. Existing uppercase letters stay at full capital height.
small-caps affects lowercase letters. all-small-caps turns uppercase and lowercase into the smaller capital style.
font-variant is the shorthand. font-variant-caps is the longhand that controls only capital variants such as small-caps.
It is Baseline Widely available. Core values like normal and small-caps work across modern browsers. Some advanced keywords need fonts that include those OpenType features. It is a browser CSS property, not a Node.js feature.

Next: font-variant-caps

Focus on capital variants with the dedicated longhand property.

font-variant-caps tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful