
- CSS - Home
- CSS - Roadmap
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Types
- CSS - Measurement Units
- CSS - Selectors
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Border Block
- CSS - Border Inline
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursor
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS - Inline Block
- CSS - Dropdowns
- CSS - Visibility
- CSS - Overflow
- CSS - Clearfix
- CSS - Float
- CSS - Arrows
- CSS - Resize
- CSS - Quotes
- CSS - Order
- CSS - Position
- CSS - Hyphens
- CSS - Hover
- CSS - Display
- CSS - Focus
- CSS - Zoom
- CSS - Translate
- CSS - Height
- CSS - Hyphenate Character
- CSS - Width
- CSS - Opacity
- CSS - Z-Index
- CSS - Bottom
- CSS - Navbar
- CSS - Overlay
- CSS - Forms
- CSS - Align
- CSS - Icons
- CSS - Image Gallery
- CSS - Comments
- CSS - Loaders
- CSS - Attr Selectors
- CSS - Combinators
- CSS - Root
- CSS - Box Model
- CSS - Counters
- CSS - Clip
- CSS - Writing Mode
- CSS - Unicode-bidi
- CSS - min-content
- CSS - All
- CSS - Inset
- CSS - Isolation
- CSS - Overscroll
- CSS - Justify Items
- CSS - Justify Self
- CSS - Tab Size
- CSS - Pointer Events
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - Max Block Size
- CSS - Min Block Size
- CSS - Mix Blend Mode
- CSS - Max Inline Size
- CSS - Min Inline Size
- CSS - Offset
- CSS - Accent Color
- CSS - User Select
- CSS - Cascading
- CSS - Universal Selectors
- CSS - ID Selectors
- CSS - Group Selectors
- CSS - Class Selectors
- CSS - Child Selectors
- CSS - Element Selectors
- CSS - Descendant Selectors
- CSS - General Sibling Selectors
- CSS - Adjacent Sibling Selectors
- CSS Advanced
- CSS - Grid
- CSS - Grid Layout
- CSS - Flexbox
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Paged Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS - Image Sprites
- CSS - Important
- CSS - Data Types
- CSS3 Advanced Features
- CSS - Rounded Corner
- CSS - Border Images
- CSS - Multi Background
- CSS - Color
- CSS - Gradients
- CSS - Box Shadow
- CSS - Box Decoration Break
- CSS - Caret Color
- CSS - Text Shadow
- CSS - Text
- CSS - 2d transform
- CSS - 3d transform
- CSS - Transition
- CSS - Animation
- CSS - Multi columns
- CSS - Box Sizing
- CSS - Tooltips
- CSS - Buttons
- CSS - Pagination
- CSS - Variables
- CSS - Media Queries
- CSS - Functions
- CSS - Math Functions
- CSS - Masking
- CSS - Shapes
- CSS - Style Images
- CSS - Specificity
- CSS - Custom Properties
- CSS Responsive
- CSS RWD - Introduction
- CSS RWD - Viewport
- CSS RWD - Grid View
- CSS RWD - Media Queries
- CSS RWD - Images
- CSS RWD - Videos
- CSS RWD - Frameworks
- CSS References
- CSS Interview Questions
- CSS Online Quiz
- CSS Online Test
- CSS Mock Test
- CSS - Quick Guide
- CSS - Cheatsheet
- CSS - Properties References
- CSS - Functions References
- CSS - Color References
- CSS - Web Browser References
- CSS - Web Safe Fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
CSS - font-feature-settings Property
CSS font-feature-settings property controls the advanced typographic features in OpenType fonts, such as swashes, small caps and ligatures etc.
Syntax
font-feature-settings: normal | feature-tag-value | initial | inherit;
Property Values
Value | Description |
---|---|
normal | The default font settings are laid out. Default. |
feature-tag-value | A space separated tuple, having a tag name and an optional value. Tag name is always a <string> of four ASCII characters, else it is invalid. Optional value can be an integer or keyword on(1) or off(0). Default is 0. |
initial | It sets the property to its initial value. |
inherit | It inherits the property from the parent element. |
Examples of CSS Font Feature Setting Property
The following examples explain the font-feature-setting property with different values.
Font Feature Setting Property with Normal Value
To no enable any special features such that the browser uses the font's default settings without applying any additional typographic enhancements, we use the normal value. This is the default value. This is shown in the following example.
Example
<!DOCTYPE html> <html> <head> <style> p { font-feature-settings: "normal"; } </style> </head> <body> <h2> CSS font-feature-setting property </h2> <h4> font-synthesis-weight: normal </h4> <p> Fact: India is home to 1.4 billion people, with 22 officially recognized languages and 7 UNESCO World Heritage Sites. </p> </body> </html>
Font Feature Setting Property with Feature Tag
To enable or disable specific typographic features within a font, we specify a space separated tuple containing a four character feature tag and a value (e.g. "liga" 1; enables standard ligatures, "kern" 0; disables kerning). Some tags have been used in the following example.
Example
<!DOCTYPE html> <html> <head> <style> p { font-size: 22px; } .fact-1 { font-feature-settings: "frac" 1; } .fact-2 { font-feature-settings: "c2sc" 1; } .fact-3 { font-feature-settings: "smcp" 1; } </style> </head> <body> <h2> CSS font-feature-setting property </h2> <h4> font-synthesis-weight: "frac" </h4> <p class="fact-1"> India is home to 1.4 billion people, with 22 officially recognized languages and 7 UNESCO World Heritage Sites. </p> <h4> font-synthesis-weight: "c2sc" </h4> <p class="fact-2"> India has 28 states and 8 Union Territories, and is the world's largest democracy by population. </p> <h4> font-synthesis-weight: "smcp" </h4> <p class="fact-3"> The Taj Mahal, a UNESCO World Heritage Site, was completed in 1653 and is renowned for its white marble architecture. </p> </body> </html>
Supported Browsers
Property | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
font-feature-setting | 48.0 | 10.0 | 34.0 | 9.1 | 35.0 |
css_reference.htm
Advertisements