CSS font-variant Property

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 4 Examples
Typography

What You’ll Learn

The font-variant property switches on alternate letter styles such as small capitals, giving your typography a refined, editorial look.

01

normal

Default glyphs.

02

small-caps

Mini capitals.

03

petite-caps

Smaller caps.

04

unicase

Mixed case.

05

Labels

Section tags.

06

Headings

Title styling.

Introduction

The font-variant property in CSS is used to control the usage of alternate glyphs within a font. It allows you to specify whether certain characters, such as small capitals or old-style figures, should be used.

This property can enhance the typographic presentation of your text, adding a unique touch to your web content. It is especially popular for labels, abbreviations, and elegant headings.

Definition and Usage

When you set font-variant: small-caps, lowercase letters render as smaller uppercase-style capitals. The browser uses dedicated small-cap glyphs when the font provides them; otherwise it may synthesize a similar effect. For finer control in modern CSS, related properties like font-variant-caps are also available.

💡
Beginner Tip

Small caps look like uppercase letters but at a reduced height. They are not the same as typing in all caps with a smaller font-size — true small caps are designed for even letter spacing and weight.

📝 Syntax

The syntax for the font-variant property is straightforward. It can be applied to any text element:

syntax.css
element {
  font-variant: value;
}

Basic Example

font-variant-basic.css
.small-caps {
  font-variant: small-caps;
}
font-variant: normal; font-variant: small-caps; font-variant: all-small-caps; font-variant: petite-caps;

Default Value

The default value of the font-variant property is normal, which means no special variant glyphs are used and the text is displayed in its normal form.

Syntax Rules

  • Accepts keyword values related to cap styles and unicase.
  • The property is inherited — child elements receive the parent's variant unless overridden.
  • Best results come from fonts that include true small-cap and variant glyphs.
  • In modern CSS, font-variant can act as a shorthand for several sub-properties.
  • Use normal to reset any variant styling.

⚡ Quick Reference

QuestionAnswer
Initial valuenormal
Applies toAll elements
InheritedYes
Most common valuesmall-caps
Modern alternativefont-variant-caps

💎 Property Values

ValueDescription
normalThe default value, which specifies a normal font face without any variants
small-capsTransforms lowercase letters into smaller uppercase letters
all-small-capsChanges all characters to small caps, including uppercase characters
petite-capsTransforms lowercase letters into petite capitals, a smaller version of small-caps
all-petite-capsChanges all characters to petite caps, including uppercase characters
unicaseA mix of uppercase and lowercase letters for stylistic purposes
titling-capsUses a titling font, which is designed for use in titles

👀 Live Preview

Compare normal text with small-caps styling:

font-variant: normal; Typography Variant Demo Text
font-variant: small-caps; Typography Variant Demo Text

Examples Gallery

Transform text into small capitals, then compare cap styles, style section labels, and apply variants to headings.

🔢 Small Capitals

Start with the reference example — paragraph text in small-caps.

Example 1 — Basic small-caps

Apply font-variant: small-caps to transform lowercase letters into small capitals.

font-variant-small-caps.css
.small-caps {
  font-variant: small-caps;
}
Try It Yourself

How It Works

Lowercase letters render as smaller cap-height glyphs. Uppercase letters typically stay at full cap height unless you use all-small-caps.

Example 2 — normal vs small-caps vs all-small-caps

See how each cap variant changes the same sentence.

font-variant-compare.css
.regular { font-variant: normal; }
.small-caps { font-variant: small-caps; }
.all-small-caps { font-variant: all-small-caps; }
Try It Yourself

How It Works

With all-small-caps, even uppercase letters shrink to the small-cap size for a uniform appearance.

📈 Typography in UI

Apply font variants to labels and headings for polished design details.

Example 3 — Section Label with petite-caps

Style a category label using petite capitals for a subtle editorial look.

font-variant-label.css
.section-label {
  font-size: 0.8125rem;
  font-variant: petite-caps;
  letter-spacing: 0.08em;
  color: #64748b;
}
Try It Yourself

How It Works

Petite caps are slightly smaller than standard small caps, making them ideal for understated labels above headings.

Example 4 — Article Title with titling-caps

Use titling caps on a headline when the font provides a dedicated titling variant.

font-variant-heading.css
.article-title {
  font-family: Georgia, serif;
  font-size: 2rem;
  font-variant: titling-caps;
  font-weight: 400;
}
Try It Yourself

How It Works

Titling caps are designed for display sizes, often with adjusted proportions suited to large headlines.

♿ Accessibility

  • Do not use small caps for long body text — they are harder to read in large paragraphs.
  • Keep sufficient size and contrast when styling labels and headings with variants.
  • Screen readers ignore font-variant — meaning must come from content and markup, not cap styling alone.
  • Avoid faux small caps when readability matters; choose fonts with true variant glyphs when possible.
  • Test legibility on mobile at the sizes where you apply petite-caps or titling-caps.

🧠 How font-variant Works

1

You choose a variant

Set a keyword such as small-caps or petite-caps.

Declaration
2

Browser checks the font

It looks for alternate glyphs or OpenType features that match the requested variant.

Font features
3

Alternate glyphs render

Letters display using small caps, petite caps, unicase, or titling forms when available.

Rendering
=

Refined typography

Text gains stylistic cap variants without changing font-family or font-size.

🖥 Browser Compatibility

The font-variant property is supported in most modern browsers, including recent versions of Chrome, Firefox, Safari, Edge, and Opera. Always test with your chosen font because variant support depends on the typeface.

Baseline · Modern browsers

font-variant in current engines

Keyword values are widely supported; visual quality depends on whether the font includes true variant glyphs.

95% Modern browser support
Google Chrome All modern versions · Desktop & Mobile
Supported
Mozilla Firefox All modern versions · Desktop & Mobile
Supported
Apple Safari All modern versions · macOS & iOS
Supported
Microsoft Edge All modern versions
Supported
Opera All modern versions
Supported
font-variant property 95% supported

Bottom line: Safe for modern projects. Pick fonts with OpenType cap variants for the best small-caps appearance.

🎉 Conclusion

The font-variant property is a useful tool for web developers looking to enhance the typographic presentation of their text. By using this property, you can add stylistic variations to your fonts, making your web content more visually appealing and engaging.

Experiment with different values to see how this property can improve the look and feel of your text. Start with small-caps for labels and headings, then explore petite-caps and titling-caps for finer control.

💡 Best Practices

✅ Do

  • Use small-caps for labels and abbreviations
  • Choose fonts with true cap variants
  • Pair with subtle letter-spacing
  • Reset with normal when needed
  • Explore font-variant-caps for modern projects

❌ Don’t

  • Use small caps for long reading paragraphs
  • Fake small caps with shrunken uppercase only
  • Assume every font supports all variant values
  • Sacrifice contrast for decorative cap styles
  • Overuse variants across every heading

Key Takeaways

Knowledge Unlocked

Five things to remember about font-variant

Use these points when styling cap variants.

5
Core concepts
normal 02

Default normal

Standard text.

Default
sc 03

small-caps

Most common.

Syntax
all 04

all-small-caps

Uniform caps.

Variant
🔁 05

Inherited

Children inherit.

Cascade

❓ Frequently Asked Questions

The font-variant property controls alternate glyph styles in a font, such as small capitals, petite caps, unicase, or titling caps, to change how letters are displayed.
The default value is normal, which means no special variant glyphs are used and text appears in its standard form.
small-caps converts lowercase letters into smaller uppercase-style capitals while leaving existing uppercase letters at their normal cap height.
small-caps affects lowercase letters only. all-small-caps turns every character, including uppercase letters, into the smaller cap style.
font-variant is the legacy shorthand that includes caps-related values. Modern CSS also provides font-variant-caps for more precise control over cap styles.

Practice in the Live Editor

Open the HTML editor, try font-variant values like small-caps and petite-caps, and compare the results with your fonts.

HTML Editor →

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.

5 people found this page helpful