Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

Setting the font size

You can use the <font> tag to change text size in two ways: you can specify a fixed or relative size.

To specify a fixed size, enter <font size="n"> where n is a number in the range 1 to 7. The default size is 3. You might use the smallest size for a copyright statement or a disclaimer. For example:

This HTML…

Displays as…

<font size="1">Itsy bitsy little text</font>

<font size="3">A BBC English sort of a font size</font>

<font size="7">A very loud boo</font>

A relative size is a number (preceded by the plus (+) or minus (-) sign) that indicates a size that is relative to the base font size. You use the <basefont> tag to set the base font size. The following example shows what happens if you use relative sizes:

This HTML…

Displays as…

<basefont size="3">
This sets the base font size to 3.
<font size="+2">Now the font size is 5.
<font size="-1">Now the font size is 2.

Remember that font sizes don't map exactly to point sizes, but you can specify point sizes using Style sheets.

You can apply size changes to several paragraphs; just put the paragraphs inside the <font> tag.