14 of 313 menu

The font-variant property

The font-variant property allows you to make small (lowercase) letters CAPITAL, but small in size. Such a writing is called capital.

Syntax

selector { font-variant: small-caps | normal; }

Values

Value Description
small-caps Makes small letters in small capitals.
normal Cancels the effect of small-caps. Usually necessary if you need to remove small caps for a certain section of text (for example, all paragraphs are made with small caps, but this one is not).

Default value: normal.

Example . The small-caps value

In this example, the letters will be capitalized, but small in size:

<p> Lorem ipsum dolor sit amet. </p> p { font-variant: small-caps; }

:

Compare the previous example (capitals), with the text written in capital letters:

<p> LOREM IPSUM DOLOR SIT AMET. </p>

:

Example . The normal value

And now there will be plain text:

<p> Lorem ipsum dolor sit amet. </p> p { font-variant: normal; }

:

byenru