HTML and CSS Reference
In-Depth Information
HTML 4 also defines the
id
attribute for the
<basefont>
tag, allowing you
to label the tag uniquely for later access to its contents. [
The id attrib-
Authors typically include the
<basefont>
tag in the head of an HTML doc-
ument, if at all, to set the base font size for the entire document. Non-
etheless, the tag may appear nearly anywhere in the document, and it
may appear several times throughout the document, each with a new
size
attribute. With each occurrence, the
<basefont>
tag's effects are im-
mediate and hold for all subsequent text.
In an egregious deviation from the HTML and Standard Generalized
Markup Language (SGML) standards, Internet Explorer does
not
inter-
pret the ending
</basefont>
tag as terminating the effects of the most
recent
<basefont>
tag. Instead, the
</basefont>
end tag resets the base
font size to the default value of 3, which is the same as writing
<basefont
size=3>
.
The following example source and
Figure 4-21
illustrate how Internet
Explorer responds to the
<basefont>
tag and
</basefont>
end tag:
Unless the base font size was reset above,
Inernet Explorer renders this part in font size 3.
<basefont size=7>
This text should be rather large (size 7).
<basefont size=6> Oh,
<basefont size=4> no!
<basefont size=2> I'm
<basefont size=1> shrinking!
</basefont><br>
Ahhhh, back to normal.