<FONT ...>

Usage Recommendation
Moving to Styles
This effect is done better with styles. See Break the <FONT> Habit

  • SIZE: size of the font
  • COLOR: color of the text
  • FACE: set the typestyle for text
 

<FONT ...> is the addictive drug of HTML. When you start using <FONT ...> you're likely to think it's the coolest HTML tag ever created. You can set the sizes, faces and colors of the fonts on your web page, all with understandable <FONT ...> tags.

Then, when you've loaded your web pages with a billion <FONT ...> tags, you find out the ugly side of <FONT ...>. You have to use it over and over to give your page the appearance you want. It doesn't work in tables unless you put <FONT ...> in every cell. If you want to change the appearance of the fonts in your page you have to change every single <FONT ...> tag. <FONT ...> has taken over your code.

Break the <FONT ...> Habit

<FONT ...> seems easy at first but in the long run your life will be much simpler if you use styles. Admittedly, styles require a little extra learning when you first start using them, but only a little. Once you get the hang of them you'll find styles much, much simpler to handle than mountains of <FONT ...> tags. See Break the <FONT> Habit to get started.


Historical Information

For the sake of completion and historical accuracy we'll look at how <FONT ...> works. Please don't take the inclusion of this information as an endorsement that you should actually use <FONT ...>.

As its name implies, <FONT ...> sets the font properties of the text it contains. To have any effect, <FONT ...> must be used with at least one of its attributes. For example, this text sets the font to a size 7:

this code produces this
<FONT SIZE=7>Hi There</FONT>
Hi There





About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.