CSS font-variantProperty


Example

Set the paragraph to small-caps font:

p.small
{
font-variant:small-caps;
}

Try it Yourself »

Property Definition and Usage Instructions

The font-variant property sets the display text of the font in small capitals, which means that all lowercase letters will be converted to uppercase, but all letters using the small-caps font are smaller in size than the rest of the text.

The font-variant property is mainly used to define small-caps text.

Default value: normal
Inherited: yes
version: CSS1
JavaScript Syntax: object.style.fontVariant="small-caps"


Browser Support

The numbers in the table indicate the first browser version that supports the property.

Property
font-variant 1.0 4.0 1.0 1.0 3.5

Property value

Value Description
normal Default value. The browser displays a standard font.
small-caps The browser displays a small-caps font.
inherit Specifies that the value of the font-variant property should be inherited from the parent element.


Related Articles

CSS Tutorial:CSS Font

CSS Reference Manual:font property

other extensions