Web Page CentralPoliciesHTMLFAQPublishingBookletToolsLinks

Home :: Learning HTML :: The FONT Element

Search

[Help]
Match:

[Off Site Link]=Off Site Link[Help]

[Direct Link to File]=Link to File[Help]

The FONT Element

The FONT element can change some aspects of the text it contains. The size or the color, or both, of the text can be changed. However, you should use FONT sparingly and with forethought.

Changing the Size

You can use the SIZE attribute to change the font size two ways: 1) as an absolute value, or 2) as a relative value. As an absolute value, you can use the numbers 1-7. Example: <FONT SIZE="4">Bigger Text</FONT>. The default size is 3. As a relative value, you define how much bigger or smaller the text should be compared to the default value (3). Example: <FONT SIZE="-1">Smaller Text</FONT>.

Instead of using FONT to change font size, you should use BIG and SMALL, which are covered in Text Level Elements. A font size of 1 or -2 is much too small to read on most Macintoshes and some Unix computers. Larger font sizes can make a page unreadable if the reader has set the font sizes on his browser to a somewhat large size (if he's sight-impaired, for example). Also, do not use FONT to simulate Headings. Indexers use Headings to generate overviews of documents; without Headings, they cannot do this.

Changing the Color

Using the COLOR attribute of FONT, you can suggest that a section of text be a different color than the rest of the text. You use the hexadecimal #RRGGBB notation or color names to specify the font color. You can read about defining colors at Document Colors. Example: <FONT COLOR="#FF00FF">Fuchsia Text</FONT>.

Once again, you should use this attribute sparingly. Netscape allows the reader to override the colors defined in the BODY element, but not colors defined in the FONT element. So, if you define some text as yellow, and a reader is overriding your colors and her default background color is yellow, that text will disappear.

Previous: Links
Next: Images


Home:: Learning HTML :: The FONT Element

Home | Policies | HTML | FAQ
Publishing | Booklet | Tools | Links

Last Update: 2000-04-19
This Page's Address: http://www.madison.k12.wi.us/webpub/basics50.htm
District Home Page: http://www.madison.k12.wi.us
HTML Editor & Publisher: Chris Burch, cburch@madison.k12.wi.us
webmaster@madison.k12.wi.us