• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The <FONT> Element

The <FONT> element is a popular one, even though it was deprecated in HTML 4.01 in favor of style sheets. This element has a few additional properties beyond the core HTML ones, as you see in Table 11.4.

Table 11.4. The Properties of the <FONT> Element (See Chapters 5 and 6 for the JavaScript core HTML properties, methods, and events that also apply to this element.)
Property NS2 NS3 NS4 NS6 IE3a IE3b IE4 IE5 IE5.5 IE6
color    x   x x x x
  Read/write
  Specifies the color of the font, as a string. Set to a color triplet or a predefined color name the browser understands. In Internet Explorer 5+, you also can set this property to an expression using setExpression.
face    x   x x x x
  Read/write
  This property holds the requested typeface family. Set this property to a string, such as “courier”. You can specify a comma-separated list of type-faces, such as “courier, arial, times-roman”, and the browser will select the first one (reading left to right) that it supports.
size    x   x x x x
  Read/write
  This property sets or gets the font size used. Set this property to an integer in the range 1 through 7. (The largest font is 7.) You also can specify relative font sizes by using a sign, such as “+1”, which increments the font size from the value used in the surrounding text by one. You have more control over font size if you use style sheets.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint