The CSS reference

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

Possible font values:

value Comments CSS
<font-style> For details look at 'font-style' 1
<font-variant> For details look at 'font-variant' 1
<font-weight> For details look at 'font-weight' 1
<font-size> For details look at 'font-size' 1
<line-height> For details look at 'line-height' 1
<font-family> For details look at 'font-family' 1

The following values refer to system fonts:
value Comments CSS
caption The font used for captioned controls (e.g., buttons, drop-downs, etc.). 2
icon The font used to label icons. 2
menu The font used in menus (e.g., dropdown menus and menu lists). 2
message-box The font used in dialog boxes. 2
small-caption The font used for labeling small controls. 2
status-bar The font used in window status bars. 2

Property "font" example:

<!DOCTYPE HTML >
<html  >
  <head>
    <title>Test</title>
    <style type="text/css">
      div {border: blue 1px solid; color:black;
           padding: 4px 4px 4px 4px; width: 400px;
      }
      .myfont { font: italic small-caps bold
                 x-large/20pt fantasy; }
    </style>
  </head>
  <body  >
     <br>
    <div class="myfont" >
      It is a shorthand property for setting
      'font-style' , 'font-variant' ,
      'font-weight' , 'font-size' , 'line-height'
      and 'font-family' at the same
      place in the style sheet.
    </div>
  </body>
</html>

Javascript access:

// To SET values ([o] is the target object)
[o].style.font="font values"
// Browsers can not return any trustworthy value from this property.
// To GET values, look at each deatil the property related to font.
© 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.