CSS Reference

"font-variant" - css property (v. css 1)

  • To specify whether or not a text should be displayed in a small-caps font.
  • Initial value: normal
  • The property is inherited
  • HTML usage: all elements
  • Browsers that support the font-variant - property :
    Internet Explorer Mozilla Firefox Opera Google Chrome Apple Safari

Possible font-variant values:

value Comments CSS
normal A value of 'normal' selects a font that is not a small-caps font (this is the default). 1
small-caps In a small-caps font the lower case letters look similar to the uppercase ones, but in a smaller size and with slightly different proportions. 1
inherit Will inherit the value from parent specification. 2

Javascript access:

// To SET values ([o] is the target object)
[o].style.fontVariant="font-variant values"
// To GET values you must first get the computed style object
// To get that object in IE or Opera:
var cStyle=[o].currentStyle;
// To get that object in Firefox, Chrome or Safari (w3c-type):
var cStyle=window.getComputedStyle([o],null)
// To GET the property value:
var value=cStyle.fontVariant;
© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.