Things That Have Changed -- Formatting Text For Appearance

Part I -- HTML Level 3

HTML 3.2 allowed the use of local text formatting using the <FONT> tag, and text formatting for an entire document using the <BASEFONT> tag, a development which was originally introduced as a Netscape extension. In HTML 4.0, use of the <FONT> and <BASEFONT> tags is deprecated in favour of mechanisms such as Cascading Style Sheets, which not only allow much more control over the appearance of text and images in a document, but also allow HTML itself to move back towards the pure SGML philosophy of allowing only markup which indicates the meaning or usage of the document's content.

Here is a list of valid attributes which can be used with the <FONT> and <BASEFONT> tags, and examples of their use and rendering:

Attribute

Description

Usage Example

Rendering Example

SIZE="[ integer size | relative size ]"
 
 
 

Note that the relative sizes are not valid attributes for the <BASEFONT> tag.

Integer size: an integer between 1 and 7. This sets the font to some fixed size, whose rendering depends on the user agent. Not all user agents may render all seven sizes.

Relative size: a relative increase in font size. The value "+1" means one size larger. The value "-3" means three sizes smaller. All sizes belong to the scale of 1 to 7. If no <BASEFONT> size is specified, the default for most user agents is 3

Integer sizes

<FONT SIZE=1>text</FONT>
<FONT SIZE=2>text</FONT>
<FONT SIZE=3>text</FONT>
<FONT SIZE=4>text</FONT>
<FONT SIZE=5>text</FONT>
<FONT SIZE=6>text</FONT>
<FONT SIZE=7>text</FONT>
 

Relative sizes

<FONT SIZE="-4">text</FONT>
<FONT SIZE="-3">text</FONT>
<FONT SIZE="-2">text</FONT>
<FONT SIZE="-1">text</FONT>
<FONT SIZE="+1">text</FONT>
<FONT SIZE="+2">text</FONT>
<FONT SIZE="+3">text</FONT>
<FONT SIZE="+4">text</FONT>
 
text
text
text
text
text
text
text
 
text
text
text
text
text
text
text
text

Attribute

Description

Usage Example

Rendering Example

COLOR="[ color name | RGB-hex-triplet ]"

This attribute sets the text color. Colors are specified using either one of the 16 standard color names shown below, or by using a RGB hex-triplet.

Color names are as follows:

Teal Black Blue Fuchsia
Gray Green Silver Maroon
Navy Olive Purple Red
Lime Aqua White Yellow
 
<FONT COLOR="fuchsia">text</FONT>
 
<FONT COLOR="#FF00FF">text</FONT>
text
 
 
text

Attribute

Description

Usage Example

Rendering Example

FACE="typeface name"

This attribute defines a comma-separated list of typeface names the user agent should search for in order of preference. Whether this tag is rendered correctly or not depends on whether the typeface named is resident on the browser's computer. If it is not, then the text will be rendered in the default typeface set in the user agent.

 
<FONT FACE="Arial, Helvetica">text</FONT> text