Font Attributes


You also can work with plenty of font style attributessee Table 21.6 for a sample.

Table 21.6. Font Style Attributes

Attribute

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

font

   

x

x

x

x

x

x

x

x

 

CSS1: [ [ <font-style> <font-variant> <font-weight> ]? <font- size > [ / <line-height> ]? <font-family>

 

CSS2: caption icon menu message-box small-caption status-bar inherit

 

Default:Varies

 

Applies to: All elements

 

This is a shorthand attribute that enables you to set the font-style , font-variant , font-weight , font-size , line-height , and font- family attributes all at once. You specify values for those attributes in that order, and without commas.

font-family

   

x

x

x

x

x

x

x

x

 

CSS1: [[ <family- name > <generic-family> ],]* [<family- name> <generic-family>]

 

CSS2: inherit

 

Default: Depends on the browser

 

Applies to: All elements

 

Indicates a list of font family names and/or generic family names. Separate the names of the fonts you want to use with commas; the browser will use the first one it can find, starting from the first font in the list.

font-size

   

x

x

x

x

x

x

x

x

 

CSS1: <absolute-size> <relative-size> <length> <percentage>

 

CSS2: inherit

 

Default: medium

 

Applies to: All elements

 

Sets the size of a font.

font-stretch

           

x

x

x

x

 

CSS2: normal wider narrower ultra -condensed extra- condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded inherit

 

Default: normal

 

Applies to: All elements

 

Sets normal, condensed, or extended font face.

font-style

   

x

x

x

x

x

x

x

x

 

CSS1: normal italic oblique

 

CSS2: inherit

 

Default: normal

 

Applies to: All elements

 

Enables you to select from normal (also called Roman or upright), italic, and oblique font faces.

font-variant

           

x

x

x

x

 

CSS1: normal small-caps

 

CSS2: inherit

 

Default: normal

 

Applies to: All elements

 

Indicates whether a font is a small-caps font (which is made up of small capital letters ).

font-weight

   

x

x

x

x

x

x

x

x

 

CSS1: normal bold bolder lighter 100 200 300 400 500 600 700 800 900

 

CSS2: inherit

 

Default: normal

 

Applies to: All elements

 

Gives the "weight" of a font, such as normal or bold.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net