Main Index |
Top Of Tree |
Tag Index |
Tag History
- What is it?
- This Physical Style tag is the most versatile of all the
character formatting tags and is also the only one of this type to
accept attributes. The tag was first introduced by Netscape which
allowed the SIZE attribute to control font sizing. Internet Explorer
also supports this tag and has added two new attributes, COLOR and FACE
which control the text color and typeface respectively. Until this tag
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 tag to HTML has increased the
authoring possibilities greatly.
- Attributes
- Color
- 2 | 3
| 3.2 | IE1 | M
| N2
- Required? No
- Description:
Specifies the color of the enclosed text.
- Values:
RGB triplet or a special
Color name
- Face
- 2 | 3
| 3.2 | IE1 | M
| N3B5
- Required? No
- Description:
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.
- Values:
Comma separated list of font names. If the font name contains spaces,
the whole name should be embedded in single quotes (the ' character.)
- Point-size
- 2 | 3
| 3.2 | IE | M
| N4B5
- Required? No
- Description:
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.
- Values:
Integers representing font point size
- Size
- 2 | 3
| 3.2 | IE1 | M | N1.1
- Required? No
- Description:
This controls the size of text contained in the font tag.
- Values:
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
'-' symbol.
Style Sheet Attributes
[More on Cascading Style Sheets]
- Class
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This represents an assigned semantic classification grouping(s) for the
current tag.
- Values:
Given as a comma separated list of alphanumeric characters. Class names
may contain spaces (multiple consecutive spaces treated as a single
space.)
- ID
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This assigns an alpha-numeric identifier that is unique
to this tag instance. Style sheets may use this attribute to reference
the current instance of this tag. Hyperlinks may also use this identifier
to serve as a destination.
- Values:
An alphanumeric string - initial character must be a letter followed
by alphabetic characters, digits, "-" or "."
characters. The allowable set of alpha-characters is restricted to the
A-Z and a-z set.
- Style
- 2 | 3
| 3.2 | IE3B1
| M | N4B3
- Required? No
- Description:
This attribute is a text string that provides rendering style
information for the current tag.
- Values:
Please see the description of
inline styles for more
information on how to use this attribute and its
possible values.
- Example
- Font SIZE relative: <font
SIZE="+2">text</font>
Font SIZE absolute: <font
SIZE=6>text</font>
Font POINT-SIZE: <font
POINT-SIZE=20>text</font>
Font COLOR: <font
COLOR="#00FF00">text</font>
Font FACE:
<font
FACE="Arial,'Times New Roman',System">text</font>
- Parent Model
-
%Anchors% |
%Virtual
Formatting% |
%Physical
Formatting% |
%Block Format
Parent% |
%Multimedia
Parent% |
<Body> |
<Address> |
<Basefont> |
<Heading> |
<Marquee>
Exceptions: <Pre>
- Content Model
- %Text% |
%Anchors% |
%Virtual Formatting% |
%Physical Formatting% |
%Line Break Content% |
%Multimedia Content%
- Tips & Tricks
- General
-
- The FONT tag should behave as any other character formatting
tag would, but because its behavior is an expanded set over other
tags like it, its behavior can not be assumed to be as consistent as
other character tags 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.
- Color
-
- 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 tags. 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.
- 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.
- Face
-
- This is a tricky attribute. Because the font specified must be
on the reader's system in order for the tag to work, the use of this
tag 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.
- The comma used as a separator is rather unique at this point
in HTML development (but is a good solution to this problem.)
- Beginning in Netscape 4.0 beta 5 a consistent set of generic,
cross-platform font family names are available for use in the FONT
FACE tag. These are the same generic names allowed by the
'font-family'
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
implement.
- Size
-
- 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 the FONT SIZE tag has 7. Special attention should be paid
to these differences.
- 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 tags instead.
Browser Peculiarities
- A brief history of FONT COLOR and A HREF interaction behavior:
- Netscape 2,3:
- 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:
- 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.
- 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 appearance
tags and attributes created by the browsers.
- Netscape's literature for version 4.0 also mentions WEIGHT as a new valid
attribute to the FONT tag. This would control the boldness characteristics
of text content in the same way the
'font-weight' 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 support this
though. For more information, see
Netscape's
page on the topic.
Boring Copyright Stuff...