font-variant property
Gets or sets whether the text of the object is in small capital letters.
Syntax
font-variant: normal | small-caps
Property values
normal-
Default. Font is normal.
small-caps-
Font is in small capital letters.
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | 1 |
| Initial Value |
Examples
The following examples use the font-variant attribute and the font-variant property to change the font to small capitals.
This example uses p as a selector in an embedded (global) style sheet to set the font style to small-caps in all paragraphs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/font-variant.htm
<p style="font-variant:small-caps">
This example uses inline scripting to set the font style to small-caps when an onmousedown event occurs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/fontVariant.htm
<div onmousedown="this.style.fontVariant='small-caps'">
See also
Send comments about this topic to Microsoft
Build date: 11/29/2012