CSS Typography Font Variant


Example

Attributes:

normal

Default attribute of fonts.

small-caps

Sets every letter to uppercase, but makes the lowercase letters(from original text) smaller in size than the letters that originally uppercase.

CSS:

.smallcaps{
   font-variant: small-caps;
}

HTML:

<p class="smallcaps">
    Documentation about CSS Fonts
    <br>
    aNd ExAmpLe
</p>

OUPUT:

Output Example

Note: The font-variant property is a shorthand for the properties: font-variant-caps, font-variant-numeric, font-variant-alternates, font-variant-ligatures, and font-variant-east-asian.