This Physical Style element is the most versatile of all the
character formatting elements and is also the only one of this type to
accept its own attributes. The element was first introduced by Netscape which
allowed for the SIZE attribute to control font sizing. Internet Explorer
also supports this element and added two new attributes, COLOR and FACE
which control the text color and typeface respectively. Until this element
was introduced, the only font display variations produced at the
character level by graphical browsers were usually Bold, Italic,
Underline and fixed-width fonts, or combinations of those
characteristics. Addition of this element to HTML has increased the
authoring possibilities greatly (although
Style Sheets[-->Index DOT Css] now
offer far greater authoring possibilities.)
This attribute indicates a specific font typeface to be used instead
of the default typeface used in 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. 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.
Comma separated list of font names. If the font name contains spaces,
the whole name should be embedded in single quotes (the ' character.)
2 | 3
| 3.2 | 4
| IE | M
| N4B5 | O
This new Netscape attribute is an alternate method of specifying the
size of text content. It allows for a richer range of font sizes than
the static 7 level scale used by the SIZE attribute. Documentation does
not specify what should happen if BOTH SIZE and POINT-SIZE
attributes are present.
Integers representing font point size
2 | 3
| 3.2 | 4
| IE1 | M
| N1 | O2.1
This controls the size of text contained in the font tag.
Values are integers which represent absolute values in the size
range from 1 (smallest) to
7 (largest). Values can also be
specified relative to the current BASEFONT value (default
usually being 3) by preceding an integer value with a '+' or
Font SIZE relative: <fontSIZE="+2">text</font>
Font SIZE absolute: <fontSIZE=6>text</font>
Font POINT-SIZE: <fontPOINT-SIZE=20>text</font>
Font COLOR: <fontCOLOR="#00FF00">text</font>
<fontFACE="Arial,'Times New Roman',System">text</font>
The FONT element should behave as any other character formatting
element would, but because its behavior is an expanded set over other
elements like it, its behavior can not be assumed to be as consistent as
other character elements on ANY browser.
FONT characteristics can be applied and mixed within Heading
levels to provide further visual clarification between headings in
addition to system default heading differences. Doing this will
still preserve the semantic differences between headings.
The COLOR attribute offers a GREAT alternative way to
create visually distinct text/section markers in long runs of text.
These documents for example make frequent use of this attribute.
There has been an interesting progression of support for applying
FONT COLOR to hyperlink elements. Early behavior of the browsers that support
this attribute (which has since changed) was that it generally had no
effect on the hyperlink color. This may have been to ensure a consistent
visual scheme to identify the links. See the 'Browser Peculiarities
section below for more details. (Note: The use of
Sheets[-->Index DOT Css]
in supporting browsers can offer an easy solution to this issue as well.)
It is possible to set a passage of text to the background
color. You will be hanging yourself if you do this. =)
Warning: On browsers that do not support this, all visual
distinctiveness gained through applied color formatting will
NOT appear. Use at your own risk.
This is a tricky attribute. Because the font specified must be
on the reader's system in order for the element to work, the use of this
attribute is not terribly wise. The problem is that each type of platform
(Macintosh, PC, UNIX, Etc.) has its own specific set of fonts.
Another reason not to use this is because authors can almost
never guarantee that a given font name is on the browser's system.
Beginning in Netscape 4.0 beta 5 a consistent set of generic,
cross-platform font family names are available for use in Netscape browsers
for the FONT FACE element. These are the same generic names allowed by the
[-->Index DOT Css]
CSS property: serif |
sans-serif | cursive |
fantasy | monospace
There is work underway to create a common set of fonts for the
web to solve this problem, but this solution will take some time to
Decimal values for SIZE are usually rounded, and values that are
out of bounds should be set to the nearest equivalent value.
It is strange that HTML heading levels have 6 integral levels,
while FONT SIZE has 7. Special attention should be paid to these
Using a FONT SIZE (or other attribute) instead of a corresponding
heading level to distinguish the importance of contained text is not
recommended. Use the heading level elements instead.
A brief history of FONT COLOR and A HREF interaction behavior:
Coloring Hyperlinks only works if the FONT COLOR is applied INSIDE
the hyperlink, and ONLY if both are INSIDE a table cell.
Internet Explorer 1, 2, 3, Netscape 4.0 Beta 1-3, Opera:
Coloring hyperlinks does not work at all.
Internet Explorer 4.0, Netscape 4.0 Beta 4+:
Coloring hyperlinks works anywhere (not just inside tables) if the
FONT COLOR is applied INSIDE the hyperlink.
The effects of the FONT element are generally not inherited by content
nested inside tables. If an author wishes to ensure that the effects
of the FONT element are applied everywhere, the element must also
be applied for every table cell in a table (in such a case CSS would be
a simpler answer.) These are the FONT attributes which apply to content
2.0: COLOR and FACE applied, SIZE ignored
3.0+: FACE applied, COLOR and SIZE ignored
None of the FONT element attributes has any effect on content nested in tables.
All FONT element attributes have an effect on content nested in tables.
Netscape's POINT-SIZE attribute is curious - it appears to be an attempt
to give added control over fonts similar to that allowed through CSS. One
of the main reasons for CSS was to STOP the proliferation of new physical style
elements and attributes created by the browsers.
A reader has reported a possible use for POINT-SIZE: Applying a 'font-size'
property to the BODY element overrides all FONT SIZE attributes. The
POINT-SIZE attribute appears to give control over font size back
to the FONT element.
Netscape's literature for version 4.0 also mentions WEIGHT as a new valid
attribute to the FONT element. This would control the boldness characteristics
of text content in the same way the
[-->Index DOT Css] property
does in CSS - a nine level boldness scale (100-900) with '400' being the
standard default. NONE of the 4.0 Netscape versions seem to actually
support this though under direct experimentation. There is a possibility that
this feature is related to Netscape's dynamic font technology, but I have
seen no concrete evidence of that. For more information on this attribute, see
page on the topic.