HTML Encyclopaedia

The font tag

The HTML element
<font>
is a paired tag used to change the way text is displayed within <font> ... </font> tags. The effect is controlled by a number of attributes

<font> tag nesting

<font> tags can be nested as is shown by this example

Hello

The HTML is
<font size=+3>H<font color=red>e</font><font color=blue>l</font><font color=green>l</font>o</font>

This is all on one line because otherwise the new-lines would be seen as "white-space" by the browser and the word "Hello" would appear with spaces between the letters - this might be a desirable effect.

If the intermediate </font> tags were omitted the effect would be progressively deeper nesting and all text after the final 'o' would be in blue since the final </font> would only undo one level of nesting.

Browsers
This tag is honoured in the same manner by all browsers except MOS3 which completely ignores the tag. OP2 does not honour the face attribute.


See also <basefont>