CSS3 font-variant Property

Here is the brief explanation on how to use the CSS3 font-variant property.

Explanation

Property :

font-variant: normal|small-caps|initial|inherit;


Where,
normal - The browser displays a normal font. This is default.
small-caps - The browser displays a small-caps font
initial - Sets this property to its default value. Read about initial
inherit - Inherits this property from its parent element

Usage:


font-variant: small-caps;

Definition:

In a small-caps font, all lowercase letters are converted to uppercase letters. However, the converted uppercase letters appears in a smaller font size than the original uppercase letters in the text.

It takes the following values.
  • normal : Default value.Displays normal font.
  • small-caps : The browser displays a small-caps font

Example :
<div style='font-variant: small-caps;'>This example explains about the font-variant property.</div>

Result:
This example explains about the font-variant property.



Ask Questions

Ask Question