Sets or retrieves whether the text of the object is in small capital letters.
Syntax
HTML
{ font-variant : sVariant }
Scripting
object.style.fontVariant [ =sVariant ]
Possible Values
sVariant
String that
specifies or receives one of the following values.
normal
Default. Font is normal.
small-caps
Font is in small capital letters.
The property is read/write
for all objects except the following, for which it is read-only:
currentStyle.
The property has a default value of
normal. The Cascading Style Sheets (CSS) attribute is
inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see>About Dynamic Properties.
Remarks
Microsoft® Internet Explorer 4.0 renders small-caps as uppercase letters in a smaller size.
Examples
The following examples use the font-variant attribute and the fontVariant 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.
<P STYLE="font-variant:small-caps">
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
This example uses inline scripting to set the font style to small-caps when an onmousedown event occurs.
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Standards Information
property is defined in
Cascading Style Sheets (CSS), Level 1 (CSS1) .