font-variant Attribute | fontVariant Property
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 one of the following values:
normal Font is normal. small-caps Font is in small capital letters. The property is read/write with 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 dynamic properties.
Remarks
Internet Explorer 4.0 renders small-caps as uppercase letters in a smaller size.
Example
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.
Sample Code
<P STYLE="font-variant:small-caps">This feature requires Internet Explorer 4.0 or later. Click the icon below 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.
<DIV onmousedown="this.style.fontVariant='small-caps'">
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, custom, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, Hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
See Also
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.