font-variant
Summary
Selects a normal, or small-caps face from a font family. Also possible by using the font shorthand.
Overview table
- Initial value
normal
- Applies to
- All elements
- Inherited
- yes
- Media
- visual
- Computed value
- As specified
- Animatable
- no
- CSS Object Model Property
fontVariant
- Percentages
- N/A
Syntax
font-variant: inherit
font-variant: normal
font-variant: small-caps
Values
- normal
- Default. Specifies a normal font face.
- small-caps
- Specifies a small-caps labeled font. If no small-case font is available, some browser (e.g. Firefox) simulate a small-case font by replacing the lowercase characters by scaled uppercase letters.
- inherit
- Inherit to the parent element.
Examples
A simple example to show the effect achieved when small-caps are applied to a text paragraph
<p>I think WebPlatform rocks</p>
The CSS applied to the HTML above.
p {
font-variant: small-caps;
}
Related specifications
See also
Related articles
Fonts
font-variant
Related pages
- CSSStyleDeclarationCSSStyleDeclaration
- currentStylecurrentStyle
- defaultsdefaults
- runtimeStyleruntimeStyle
- stylestyle
- fontfont
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]