X

Headline

This is an important message requiring you to make a choice if you're based in the EU.

CSS font-variant-caps Property

The font-variant-caps property allows to select alternate glyphs for small, petite capitals and titling. This property has the following values:

  • normal
  • small-caps
  • all-small-caps
  • petite-caps
  • all-petite-caps
  • unicase
  • titling-caps
Initial Value normal
Applies to All elements. It also applies to ::first-letter and ::first-line.
Inherited Yes.
Animatable No.
Version CSS3
DOM Syntax object.style.fontVariantCaps = "petite-caps";

Syntax

font-variant-caps: normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps;

Example

<!DOCTYPE html>
<html>
  <head>
    <title>The title of the document </title>
    <style>
      .all-small-caps {
      font-variant-caps: all-small-caps;
      font-style: italic;
      }
      .small-caps {
      font-variant-caps: small-caps;
      font-style: italic;
      }
      .normal {
      font-variant-caps: normal;
      font-style: italic;
      }
    </style>
  </head>
  <body>
    <h2>Font-variant-caps property example</h2>
    <p class="all-small-caps">
      The font-variant-caps CSS property controls the use of alternate glyphs for capital letters.
    </p>
    <p class="small-caps">Small caps!</p>
    <p class="normal">Normal caps!</p>
  </body>
</html>

Values

Value Description
normal The use of alternate glyphs is not activated.
small-caps Allows to display small capitals. Small-caps glyphs use the form of uppercase letters, but are reduced to the size of lowercase letters.
all-small-caps Allows to display small capitals for upper and lowercase letters.
petite-caps Allows to display petite capitals.
all-petite-caps Allows to display petite capitals for upper and lowercase letters.
unicase Allows to display mixture of small capitals for uppercase letters with normal lowercase letters.
titling-caps Allows to display titling capitals.
initial It makes the property use its default value.
inherit It inherits the property from its parents element.

Browser support

52.0+ x 34.0+ 9.1+ 39.0+


Do you find this helpful?

Related articles