The font-feature-settings property controls advanced OpenType features in fonts, such as ligatures and small caps. It helps you fine-tune typography for a more polished look.
01
OpenType
Font features.
02
Feature tags
Four letters.
03
0 or 1
Off or on.
04
normal
Default mode.
05
liga
Ligatures.
06
smcp
Small caps.
Fundamentals
Introduction
The font-feature-settings property in CSS allows web developers to control advanced typographic features in OpenType fonts. This includes ligatures, alternate glyphs, and other font-specific variations that can enhance the readability and aesthetics of text.
Definition and Usage
By using this property, you can fine-tune the typography on your website to achieve a more polished and professional look. Apply it when a font supports OpenType features and you need precise control beyond basic properties like font-weight or font-variant-caps.
💡
Beginner Tip
Features only work if the font file includes them. Always test with the exact font you plan to use, and prefer higher-level properties like font-variant-caps when they cover your needs.
Foundation
📝 Syntax
The syntax for the font-feature-settings property involves specifying feature tag strings and their values:
syntax.css
element{font-feature-settings:"feature"value;}
feature — A four-character OpenType tag (e.g. "liga" for standard ligatures).
value — A numeric value, usually 1 to enable or 0 to disable the feature.
Basic Example
font-feature-settings-basic.css
p{font-feature-settings:"liga"1,"smcp"1;}
"liga" 1"smcp" 1"tnum" 1"zero" 1
Default Value
The default value of the font-feature-settings property is normal, which means that no specific OpenType features are applied, and the browser uses the font's default settings.
Syntax Rules
Use quoted four-letter tags followed by a number: "liga" 1.
Separate multiple features with commas.
Use normal to reset to default feature behavior.
The property is inherited.
Effects depend on the active font-family supporting each feature.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
normal
Applies to
All elements
Inherited
Yes
Value type
normal or comma-separated "tag" number pairs
Common tags
liga ligatures, smcp small caps, tnum tabular nums
Reference
💎 Property Values
Value
Description
normal
No font features are explicitly enabled or disabled beyond defaults.
"tag" 1
Enables the OpenType feature identified by the four-letter tag.
"tag" 0
Disables the OpenType feature identified by the tag.
Common OpenType feature tags
Tag
Feature
Typical use
liga
Standard ligatures
Join letter pairs like fi and fl
dlig
Discretionary ligatures
Decorative optional ligatures
smcp
Small caps
Uppercase-style letters at x-height
tnum
Tabular numbers
Aligned digits in tables and data
zero
Slashed zero
Distinguish 0 from O in code or data
onum
Oldstyle figures
Numbers with varying ascenders/descenders
Preview
👀 Live Preview
Compare normal settings with "smcp" 1 small caps on a serif font:
font-feature-settings: normal;OpenType Features Demo Text
font-feature-settings: "smcp" 1;OpenType Features Demo Text
Hands-On
Examples Gallery
In this example, we enable standard ligatures and small caps in a paragraph — plus disabling ligatures, tabular numbers, and slashed zeros.
📝 OpenType Features
Start with the reference example — ligatures and small caps enabled together.
Example 1 — Ligatures and Small Caps
Enable standard ligatures and small caps on paragraph text with an OpenType-capable font.
font-feature-settings-liga-smcp.html
<style>p{font-family:Georgia, serif;font-feature-settings:"liga"1,"smcp"1;}</style><p>
The quick brown fox jumps over the lazy dog. Check ligatures and small caps.
</p>
When the font supports it, zeros gain a slash or dot so they are visually distinct from capital O.
A11y
♿ Accessibility
Prioritize readability over decorative ligatures or stylistic alternates in body text.
Test small caps and figure styles at the sizes real users will read.
Do not rely on typography alone to communicate meaning or data relationships.
Ensure sufficient contrast remains when using alternate glyphs.
Provide fallbacks when a feature is unsupported by the user's font.
🧠 How font-feature-settings Works
1
You choose feature tags
Write quoted four-letter OpenType tags with 1 or 0 to enable or disable each feature.
Tags
2
Browser checks the font
The active font file must include the requested feature tables for any change to appear.
OpenType
3
Glyphs are substituted
The renderer swaps standard glyphs for ligatures, small caps, tabular figures, or other variants.
Rendering
=
📝
Refined typography
Text uses advanced font capabilities for a more polished, professional appearance.
Compatibility
🖥 Browser Compatibility
The font-feature-settings property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. Test across browsers because feature rendering can vary slightly by platform and font.
✓ Baseline · Modern browsers
OpenType features in today’s browsers
Feature tags work reliably when the font supports them. Always verify with your chosen typeface.
97%Modern browser support
Google Chrome48+ · Desktop & Mobile
Full support
Mozilla Firefox34+ · Desktop & Mobile
Full support
Apple Safari9.1+ · macOS & iOS
Full support
Microsoft Edge15+ · Chromium
Full support
Opera35+ · Modern versions
Full support
font-feature-settings property97% supported
Bottom line: Widely supported in modern browsers. Feature visibility still depends on the font file and platform renderer.
Wrap Up
🎉 Conclusion
The font-feature-settings property provides web developers with powerful control over typography, allowing the activation of specific OpenType features to improve text rendering. By enabling features like ligatures, alternate glyphs, and small caps, you can enhance the visual appeal and readability of your text.
Experiment with different settings to see how they contribute to a more sophisticated design. Remember that tags only work when the font supports them, and higher-level properties may be simpler for common cases.
Test features with the exact font files used in production
Use font-variant-* properties when they cover your need
Combine multiple tags in one declaration when needed
Reset with font-feature-settings: normal; when overriding
Document non-obvious tags like tnum for future maintainers
❌ Don’t
Assume every font supports every OpenType tag
Overuse discretionary ligatures in UI labels
Enable small caps without checking readability at body sizes
Rely on feature settings when a simpler CSS property exists
Forget to test on mobile devices and different operating systems
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about font-feature-settings
Use these points when tuning OpenType typography.
5
Core concepts
OT01
OpenType
Advanced glyphs.
Purpose
liga02
Feature tags
Four letters.
Syntax
1/003
Enable/disable
1 on, 0 off.
Values
normal04
Default
Font defaults.
Initial
🔠05
Font-dependent
Must exist in font.
Rule
❓ Frequently Asked Questions
The font-feature-settings property enables or disables advanced OpenType features in a font, such as ligatures, small caps, tabular numbers, and alternate glyphs.
The default value is normal, which means no specific OpenType features are forced on or off beyond the font and browser defaults.
Feature tags are four-letter codes like liga for standard ligatures and smcp for small caps. You pass them as quoted strings with 1 to enable or 0 to disable.
No. The font file must include the requested OpenType feature. If the feature is not built into the font, the setting has no visible effect.
font-variant-caps is a higher-level property for cases like small caps. font-feature-settings gives lower-level control over individual OpenType tags when you need fine-grained typography.