font-variant property CSS Reference



Definition and Usage

The font-variant CSS property selects a normal, or small-caps face from a font family. Setting font-variant is also possible by using the font shorthand.

  • Initial normal
  • Applies to all elements
  • Inherited yes
  • Media visual
  • Computed Value as specified
  • Animatable no
  • Canonical order the unique non-ambiguous order defined by the formal grammar

Syntax

Formal syntax: normal | small-caps 
font-variant: normal
font-variant: small-caps
font-variant: inherit

Values

normal
Specifies a normal font face.
small-caps
Specifies a font that is labeled as a small-caps font. If a small-caps font is not available, Mozilla (Firefox) and other browsers will simulate a small-caps font, i.e. by taking a normal font and replacing the lowercase letters by scaled uppercase characters.

The small-caps values takes into account language-specific case mapping rules, like:

  • In Turkic languages, like Turkish (tr), Azerbaijani (az), Crimean Tatar (crh), Volga Tatar (tt), and Bashkir (ba), there are two kinds of i, with and without the dot, and two case pairings: i/I and ?/I.
  • In German (de), the ? becomes SS in uppercase.
  • In Greek (el), vowels lose their accent when the whole word is in uppercase (?/?), except for the disjunctive eta (?/?). Also, diphthongs with an accent on the first vowel lose the accent and gain a diacritic on the second vowel (??/??).

The language is defined by the lang HTML attribute or the xml:lang XML attribute.

Support for these specific cases vary from one browser to the other, so check the browser compatibility table.


Examples

p {
  font-variant: small-caps;
}

Compatibility

Desktop browsers

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support1.01.0 (1.0)4.03.51.0 (85)
ßSSNA1.0 (1.7 or earlier)NANANA
iİ and ıINot supported14.0 (14)NANANot supported
Greek accented lettersNot supported15.0 (15)Not supportedNot supportedNot supported

Mobile browsers

FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic supportNANANANANA
ßSSNANANANANA
iİ and ıINot supported14.0 (14)NANANot supported
Greek accented lettersNot supportedNot supportedNot supportedNot supportedNot supported

Relative articles