CSS/Properties/font-variant

From W3C Wiki
Jump to: navigation, search

font-variant

The font-variant property selects the weight of the font.

Description

Values normal | small-caps | inherit
Initial value normal
Applies to All elements
Inherited Yes


Values

  • normal
    Specifies a font that is not a small-caps font.


  • small-caps
    Specifies a small-caps font.


  • inherit
    Takes the same specified value as the property for the element's parent.


Example

Example A

[style.css]

p#no{ font-variant: normal; }
p#sm{ font-variant: small-caps; }

[index.html]

<body>
  <p id="no">This is a paragraph(normal)</p>
  <p id="sm">This is a paragraph(small-caps)</p>
</body>

Csslist2 font-variant.png

CSS Reference

The CSS specification defines the font-variant property in 15.5 Small-caps.