<FONT> | NN all IE all HTML 3.2
<FONT>...</FONT> | HTML End Tag: Required
A font element is a container whose contents are rendered with the font characteristics defined by the element's attributes. This element is deprecated in HTML 4 in favor of font attributes available in style sheets that are applied directly to other elements or the arbitrary span container for inline font changes. This element will be supported for a long time to come to allow backward compatibility with web pages designed for older browsers, however.

For nested tables in Navigator 4, style sheet inheritance frequently breaks down. Inserting font wrappers around content inside a td element can fortify your control over the design. Going forward, use font elements only as a last resort if a browser version balks at obeying CSS font rules.

The font element evolved over its lifetime, adding new attributes along the way to work in the more mature browsers. Navigator included some proprietary attributes for Version 4 (only) that are better served by style sheets for cross-browser compatibility.

Example
    <FONT face="Times, serif" size="4">
Object Model Reference
    [window.]document.getElementById(elementID)
Element-Specific Attributes

color | face | point-size | size | weight

Element-Specific Event Handler Attributes
None.

color | NN 2 IE 3 HTML 3.2
color="colorTripletOrName" | Optional
Sets the font color of all text contained by the font element. This attribute is deprecated in HTML 4 in favor of style sheets.
Example
    <FONT color="Olive">...</FONT>
Value
A hexadecimal triplet or plain-language color name. See Appendix A for acceptable plain-language color names.
Default
Browser default.
Object Model Reference
    [window.]document.getElementById(elementID).color

face | NN 3 IE 3 HTML 4
face="fontFamilyName1[, ... fontFamilyNameN]" | Optional
You can assign a hierarchy of font families to use for a segment of text contained by a font element. The browser looks for the first font family in the comma-delimited list of font family names until it either finds a match on the client system or runs out of choices, at which point the browser default font family is used. Font family names must match the system font family names exactly. If you use this attribute (instead of the preferred font-family style sheet attribute), you can always suggest a generic font face (serif, sans-serif) as the final choice.
Example
    <FONT face="Bookman, Times Roman, serif">...</FONT>
Value
One or more font family names, including the recognized generic faces: serif | sans-serif | cursive | fantasy | monospace.
Default
Browser default.
Object Model Reference
    [window.]document.getElementById(elementID).face

id | NN 4 IE 4 HTML 4
id="elementIdentifier" | Optional
A unique identifier that distinguishes this element from all the rest in the document. Can be used to associate a single element with a style rule naming this attribute value as an ID selector. An element can have an ID assigned for uniqueness as well as a class for inclusion within a group. See Chapter 3.

IE 4 and later and Netscape 6 allow id attributes for nonrenderable elements, but if your code requires validation, be aware that the W3C HTML 4 and XHTML DTDs do not. Because all W3C DOM elements have an id property, it is natural to assign an id attribute to non-renderable elements if scripts must reference those elements. Or, your scripts may use other ways (e.g., the array returned by document.getElementsByTagName( )) to reference such elements.

Assign identifiers to id attributes in order to duplicate values previously only assigned to name attributes in elements that feature the name attribute. Current browser form controls still require name attributes for name/value pairs to be submitted with the form, and a elements acting as anchors still need name attributes. Be sure to assign an identifier to the id attribute of any element you intend to reference by script.

Example
    <H2 id="sect3Head">Section Three</H2>
Value
Case-sensitive identifier.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).id

lang | NN 3 IE 4 HTML 4
lang="languageCode" | Optional
The language being used for the element's attribute values and content. A browser can use this information to assist in proper rendering of content with respect to details such as treatment of ligatures (when supported by a particular font or required by a written language), quotation marks, and hyphenation. Other applications and search engines might use this information to aid the selection of spell-checking dictionaries and the creation of indices.
Example
    <SPAN lang="de">Deutsche Bundesbahn</SPAN>
Value
Case-insensitive language code.
Default
Browser default.
Object Model Reference
    [window.]document.getElementById(elementID).lang

point-size | NN |4| IE n/a HTML n/a
point-size="pointSize" | Optional
The point-size attribute is Navigator 4's nonCSS equivalent of setting the font size by specific point size (rather than by relative font size directed by the size attribute). If you assign a value to the point-size attribute and set the font-size style attribute, the style attribute takes precedence. If you are aiming for cross-browser deployment, I suggest using style sheets exclusively for precise point or pixel sizes.
Example
    <FONT point-size="14">...</FONT>
Value
A positive integer, representing the desired point size.
Default
Browser default.

size | NN all IE all HTML 3.2
size="integerOrRelativeSize" | Optional
Font sizes referenced by the size attribute are the relative size scale that is not tied to any one point size across operating system platforms. The default browser font size is 3. The range of acceptable values for the size attribute are integers from 1 to 7 inclusive. The exact point size varies with the operating system and browser design.

Users can often adjust the default font size in preferences settings. The size attribute overrides that setting. Moreover, size values can be relative to whatever font size is set in the preferences. By preceding an attribute value with a + or - sign, the browser's default size can be adjusted upward or downward, but always within the range of 1 through 7.

Example
    <FONT size="4">...</FONT>
    <FONT size="+3">...</FONT>
Value
Either an integer (quoted or not quoted) or a quoted relative value consisting of a + or - symbol and an integer value.
Default
3
Object Model Reference
    [window.]document.getElementById(elementID).size

style | NN 4 IE 4 HTML 4
style="styleSheetProperties" | Optional
This attribute lets you set one or more style sheet rule property assignments for the current element. You may use the CSS or (for Navigator 4 only) JavaScript syntax for assigning style attributes. Use the style attribute only with visible (renderable) elements.
Example
    <SPAN style="color:green; font-size:18px">Big, green, and bold</SPAN>
Value
An entire CSS-syntax style sheet rule is enclosed in quotes. Multiple style attribute settings are separated by semicolons. Style sheet attributes are detailed in Chapter 11.
Default
None.
Object Model Reference
    [window.]document.getElementById(elementID).style

weight | NN |4 | IE n/a HTML n/a
weight="boldnessValue" | Optional
The weight attribute is Navigator 4's nonCSS equivalent of setting the font weight with a regular attribute rather than by style sheet rule. The attribute is unreliable, so the font-weight CSS style attribute is a better choice.
Value
Integer value between 100 and 900 in increments of 100. A value of 900 is the maximum boldness setting.
Default
Unknown.