This element changes the default font attributes that all contained
text is based on. While none of the attributes for this element are
required, this element will not have any effect unless at least one of
the attributes is present.
Standards Details:
Deprecated in HTML 4.x/XHTML 1.0; Dropped in XHTML 1.1;
Required? No
Description:
This attribute indicates a specific default font typeface to be used
instead of the normal default typeface of the browser. If the system
that is viewing the document does not have the font typeface specified
by this attribute then the browser default is used instead. To ease
portability, multiple typefaces can be specified in the attribute value
separated by commas. It will check for availability starting from the
style name on the left, working its way right.
Values:CDATA.
[Comma separated list of font names. Font names with spaces are encapsulated
with single quote characters.]
Size
[2|3|3.2|4]
[X1|X1.1]
[IE1|M|N1-N4.x|O2.1]
Standards Details:
Deprecated in HTML 4.x/XHTML 1.0; Dropped in XHTML 1.1;
Required? No
Description:
This attribute changes the default size of text contained in FONT
elements. Values can be specified relative to the default BASEFONT value of
3 or as absolute values in the size range.
Values:CDATA.
[Integers ranging from 1 (smallest) to
7 (largest) or relative size changes (an integer preceded
by a '+' or '-' character) based on a current base default size.]
Example
Text Before <basefontsize="5"
color="#00ff00"
face="Arial">this is sample
text</basefont> Text After
Only the SIZE attribute of BASEFONT is currently widely supported.
Other attributes are only supported by Internet Explorer, but HTML 4.0
includes them. For now use of these other attributes is discouraged, but
increased support may occur in time.
DTD NOTE: Information on this element here
should not be considered gospel by any means. HTML 3.2 and 4.0, as
well as the Internet Explorer 3.0 DTD treat BASEFONT in a way that
I consider INCORRECT. The mentioned DTDs treat BASEFONT
as a stand-alone element, which totally eliminates a content model. The
original Netscape description is nebulous on this point, but observed
behavior of the element in IE and Netscape totally contradicts what the
DTDs say - it is very obviously a container. I constructed a Parent/Content
relationship based on this idea.
Browser Peculiarities
[Test]
Netscape 1.0-4.x and Internet Explorer versions ignore this element
when applied around table structures. For it to apply within a table
structure as well, one must apply FONT or BASEFONT elements in each
table cell. This is painful. The only way to eliminate so much extra
effort is to use style sheets.
[Test]
The effect of BASEFONT SIZE in Internet Explorer 1.0-2.0, Netscape 1.0
and Opera is to serve as a starting point in calculating relative FONT
SIZE change values. Later versions of Internet Explorer and Netscape
1.1-4.x allow the setting of a default font size for contained text.
[Tests: 1,
2]
Neither Internet Explorer or Netscape 1.0-4.x apply the BASEFONT SIZE
attribute value to heading levels. Internet Explorer does
apply the FACE and COLOR values to headings though.
Beginning with Netscape 6.x, the BASEFONT element is no longer
supported. They suggest using CSS to achieve the effects of BASEFONT as
an alternative. To read more about this decision see Mozilla's
Bugzilla 3875.