The best CSS font-variant property Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,related articles,

CSS font-variant property

Examples

The paragraph is set to Small Caps Fonts:

p.small
{
font-variant: small-caps;
}


Attribute definitions and instructions

font-variant property of the small caps font text, which means that all lowercase letters will be converted to uppercase, all letters but use small-caps font compared to the rest of the text, its font size smaller

font-variant property is primarily used to define small-caps text

Defaults: normal
inherit: yes
version: CSS1
JavaScript syntax: object .style.fontVariant = "small-caps"


Browser Support

Figures in the table represent the first browser to support the version number of the property.

属性
font-variant 1.0 4.0 1.0 1.0 3.5

Property Value

value description
normal Defaults. The browser displays a standard font.
small-caps The browser displays a small caps font.
inherit Provisions should inherit font-variant property value from the parent element.


related articles

CSS tutorial: CSS the Font

CSS Reference: font properties

CSS font-variant property
10/30