CSS font-feature-settings Property

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

What You’ll Learn

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.

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.

📝 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.

⚡ Quick Reference

QuestionAnswer
Initial valuenormal
Applies toAll elements
InheritedYes
Value typenormal or comma-separated "tag" number pairs
Common tagsliga ligatures, smcp small caps, tnum tabular nums

💎 Property Values

ValueDescription
normalNo font features are explicitly enabled or disabled beyond defaults.
"tag" 1Enables the OpenType feature identified by the four-letter tag.
"tag" 0Disables the OpenType feature identified by the tag.

Common OpenType feature tags

TagFeatureTypical use
ligaStandard ligaturesJoin letter pairs like fi and fl
dligDiscretionary ligaturesDecorative optional ligatures
smcpSmall capsUppercase-style letters at x-height
tnumTabular numbersAligned digits in tables and data
zeroSlashed zeroDistinguish 0 from O in code or data
onumOldstyle figuresNumbers with varying ascenders/descenders

👀 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

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>
Try It Yourself

How It Works

"liga" 1 turns on standard ligatures where the font provides them. "smcp" 1 renders lowercase letters as small cap glyphs.

Example 2 — Disable Ligatures

Turn ligatures off when you need separate letters for clarity, such as in certain logos or code-like strings.

font-feature-settings-no-liga.css
.no-ligatures {
  font-feature-settings: "liga" 0;
}
Try It Yourself

How It Works

Setting "liga" 0 explicitly disables standard ligatures even if the font would normally use them.

🔢 Numbers & Data

Use OpenType number features for tables, dashboards, and code.

Example 3 — Tabular Numbers

Align digits in columns with "tnum" 1 so each number has equal width.

font-feature-settings-tnum.css
.stats {
  font-variant-numeric: tabular-nums;
  /* equivalent high-level option */
  font-feature-settings: "tnum" 1;
}
Try It Yourself

How It Works

Tabular figures share the same width, so numbers line up vertically in price lists and data tables.

Example 4 — Slashed Zero

Use "zero" 1 to differentiate zero from the letter O in technical content.

font-feature-settings-zero.css
code {
  font-family: ui-monospace, monospace;
  font-feature-settings: "zero" 1;
}
Try It Yourself

How It Works

When the font supports it, zeros gain a slash or dot so they are visually distinct from capital O.

♿ 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.

🖥 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 Chrome 48+ · Desktop & Mobile
Full support
Mozilla Firefox 34+ · Desktop & Mobile
Full support
Apple Safari 9.1+ · macOS & iOS
Full support
Microsoft Edge 15+ · Chromium
Full support
Opera 35+ · Modern versions
Full support
font-feature-settings property 97% supported

Bottom line: Widely supported in modern browsers. Feature visibility still depends on the font file and platform renderer.

🎉 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.

💡 Best Practices

✅ Do

  • 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

Key Takeaways

Knowledge Unlocked

Five things to remember about font-feature-settings

Use these points when tuning OpenType typography.

5
Core concepts
liga 02

Feature tags

Four letters.

Syntax
1/0 03

Enable/disable

1 on, 0 off.

Values
normal 04

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.

Practice in the Live Editor

Open the HTML editor, toggle OpenType feature tags, and compare ligatures, small caps, and number styles.

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