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.
Fundamentals
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.
Foundation
📝 Syntax
The syntax for the font-variant property is straightforward. It can be applied to any text element:
Titling caps are designed for display sizes, often with adjusted proportions suited to large headlines.
A11y
♿ 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.
Compatibility
🖥 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 ChromeAll modern versions · Desktop & Mobile
Supported
Mozilla FirefoxAll modern versions · Desktop & Mobile
Supported
Apple SafariAll modern versions · macOS & iOS
Supported
Microsoft EdgeAll modern versions
Supported
OperaAll modern versions
Supported
font-variant property95% supported
Bottom line: Safe for modern projects. Pick fonts with OpenType cap variants for the best small-caps appearance.
Wrap Up
🎉 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.
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.