Sets whether the text of the object is in small capital letters.

Syntax

{ font-variant: 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.

This property has a default value of normal. It is inherited.

Examples

The following example uses the font-variant property to change the font to small capitals. This example uses the P element as a selector in an embedded (global) style sheet to set the font style to small-caps in all paragraphs:

 Copy Code
<p style="font-variant:small-caps">

This example uses inline scripting to set the font style to small-caps when an onmousedown event occurs:

 Copy Code
<div onmousedown="this.style.font-variant='small-caps'">

Standards information

Applies to

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, DD, DEFAULTS, DFN, 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, LI, OL, P, S, SPAN, SUB, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See also

Concepts