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.
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: Comma separated list of font
names. Font names with spaces are encapsulated with single quote
characters.
Size
2 | 3
| 3.2 | 4
| IE1 | M
| N1 | O2.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:
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
Internet Explorer and Netscape 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.
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 allow
the setting of a default font size for contained text.
Neither Internet Explorer or Netscape apply the BASEFONT SIZE attribute
value to heading levels. Internet Explorer does apply the
FACE and COLOR values to headings though.