Ronalds Vilciņš

Using small caps with CSS font-variant

The CSS font-variant property controls alternate forms of a typeface. A common use is small caps:

p {
  font-variant: small-caps;
}

This does not simply make lowercase letters smaller. When the selected font includes real small-cap glyphs, the browser can use those instead. Otherwise, it may simulate the effect.

For the basic form of the property, the useful values are:

font-variant is a shorthand for several more specific properties, but for a simple small-caps treatment, this is all you need. Just check the result with the actual font you plan to use—the quality depends on the typeface.

Enjoyed reading this?

If you found this article helpful, consider supporting my writing. Every little bit helps keep this blog going.

← Back to all articles