Framify

Tag: <font>

<font> Syntax

Syntax Diagram for <font>
Opening Tag Content Closing
Tag
Open Parameter = Value Close
<font size = + n > text </font>
-
n
color = color
face = font list

<font> Description

The <font>. . . </font> tags cause the text that occurs between them to be of a specified size, typeface, and/or color.
size
Font size may be specified either as an absolute size (as defined by the browser's preferences), or a relative size. The font size as specified in the browser's preferences is, by definition, size 3, on a scale of 1 to 7. Absolute size specification uses an integer size specifier without a "+" or a "-", and it selects a size in the scale of 1 to 7. Relative size specification uses a "+" or a "-" to specify a increment or decrement from the size specified in the <basefont> directive, if any.
color
Font color is specified in the normal manner: either as a name (e.g., "red") or as a hexadecimal triad of two-digit numbers (e.g., "ff0000").
face
The typeface is selected by name in a comma-separated list of preferences: listed first is the font you'd most like to be displayed--this one will be used if it exists on the computer that is running the browser. If that font is not present, it checks the second choice, and uses it if it is present. If not, it goes on to the third choice, and so on. Typically, similar-looking fonts are requested by their names on the various platforms, because you usually don't know which kind of machine will be used to browse your page.
Note that if large portions of your page's text are to be a non-standard size, <basefont> may be a better tag to use.

<font> Example

This markup: This is <font color=red>red</font> text; but so is <font color=ff0000>this</font>. And <font size=+2>here is larger</font> text, and <font size=2>this is smaller</font>. . . .causes the following to be displayed:
This is red text; but so is this. And here is larger text, and this is smaller.
This markup: <font face="helvetica, arial">Here is an example of either <b>Helvetica</b> (more likely on Macintoshes and UNIX workstations) or <i>Arial</i> (more likely on a PC), assuming it is installed on your system.</font> <p><font face="palatino, book antigua" size=+1>Here is an example of <b>Palatino</b> (Macs, UNIX workstations) or <i>Book Antigua</i> (PCs).</FONT> . . .causes the following to be displayed:
Here is an example of either Helvetica (more likely on Macintoshes and UNIX workstations) or Arial (more likely on a PC), assuming it is installed on your system.

Here is an example of Palatino (Macs, UNIX workstations) or Book Antigua (PCs).

And finally, to show that <font> tags can be nested, this markup: <font face="helvetica, arial">This whole block of text is sans serif; <font size=+2>this subsection is larger, and <font color=red>this subsubsection is red</font>.</font></font> . . .causes the following to be displayed:
This whole block of text is sans serif; this subsection is larger, and this subsubsection is red.

Last Modified: