Little Web Hut

CSS 2.1 Reference: font-variant Property

CSS font-variant Property
Syntax
selector {font-variant: value;}
  • value is specified by using one of the following keywords: normal, small-caps, or inherit.
Usage

The font-variant property is used to specify a normal or small-caps font. A small-caps font is one in which the lowercase letters look like uppercase letters but they are smaller.

This property is specified by using a keyword according to the syntax shown above.


CSS Example: The font-variant properties are set using both normal and small-caps font variants.
  #tst1 {font-variant: normal;}
  #tst2 {font-variant: small-caps;}
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style

Keywords
  • normal - This is a sample of a normal font variant.
  • small-caps - This is a sample of a small-caps font variant. Lowercase letters look like small uppercase letters.
  • inherit - The inherit keyword is used to specify that the value for this property should be taken from the parent element. If inherit is used with the root element, then the initial value for this property will be used.
Applies To All elements
Inherited Yes
Initial Value normal


font-variant Property Examples
Test It HTML StyleTest It HTML StyleTest It HTML5 StyleThe font-variant properties are set using both normal and small-caps font variants.