font-variant - HTML CSS CSS Property

HTML CSS examples for CSS Property:font-variant

Description

This font-variant CSS property sets the variation of the font family.

The following table summarizes the font-variant Property.

Item Value
Default value: normal
Applies to:All elements
Inherited: Yes
Animatable: No.

Syntax

The syntax of the property is as follows:


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

Property Values

The following table describes the values of this property.

Value Description
normal Set a normal font face.
small-caps Set a font that is labeled as a small-caps font.
initialSets this property to its default value.
inherittake the value of its parent element font-variant property.

The example below shows the font-variant property.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS font-variant property</title>
  <style type="text/css">
    p {<!-- ww w.j a va 2  s.  co  m-->
      font-variant: small-caps;
    }
    </style>
 </head>
 <body>
  <p>This is a paragraph.</p>
 </body>
</html>

Related Tutorials