0 out of 1 rated this helpful - Rate this topic

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 ToAll elements
Mediavisual
Inherited1
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

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
font

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.