Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS font-variant property


May 05, 2021 CSS Reference Manual


Table of contents


CSS font-variant property


Set the paragraph to a small capital font:

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

Try it out . . .

Description of property definition and use

The font-variant property sets the font display text for small capital letters, which means that all lowercase letters are converted to capitals, but all letters that use small capital fonts have smaller font sizes than the rest of the text

The font-variant property is primarily used to define small capital text

Default: normal
Inherited: yes
Version: CSS1
JavaScript syntax: object .style.fontVariant="small-caps"


Browser support

The numbers in the table support the first browser version number of the property.

Attributes
font-variant 1.0 4.0 1.0 1.0 3.5

The property value

Value Describe
normal The default. The browser displays a standard font.
small-caps The browser displays fonts in small capital letters.
inherit Specifies that the value of the font-variant property should be inherited from the parent element.


Related articles

CSS tutorial: CSS Font

CSS Reference Manual: Font Properties