FONT TAG and ATTRIBUTES

<FONT></FONT>

This element allows specification of the size, color, and font of the text it encloses. Use of this element is not encouraged as style sheets provide a cleaner way of providing the same functionality when they are supported.


ATTRIBUTES

CLASS = "class name(s)"
COLOR = "color name | #RRGGBB"
FACE = "font name"
SIZE = "1 to 7 | +1 to +6 | -1 to -6"
STYLE = "style information"

EVENTS

onclick
ondblclick
ondragstart
onhelp
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
onselectstart


CLASS  See Cascading Style Sheets (CSS) Information.

COLOR  This attribute sets the text color using either a browser-dependent named color or a color specified in the hexadecimal #RRGGBB format.

FACE  This attribute contains a list of one or more font names separated by commas. The user agent looks through the specified font names and renders the text in the first font that is supported. The default font type for most browsers is "Times New Roman." It is permissible to include more than one font type in the FACE parameter, in which case the browser will change the font face to the first type it recognizes. For instance, if <FONT FACE="ARIAL, COMIC SANS MS"> is written, the font face will be changed to "Arial" type. If the browser does not recognize this type, the font face will be changed to "Comic Sans MS" type. If the browser does not recognize this type either, the font face will remain as "Times New Roman."

SIZE  This attribute specifies the font size as either a numeric or relative value. Numeric values range from 1 to 7 with 1 being the smallest and 3 the default. The relative values, + and -, increment or decrement the font size relative to the current size. The value for increment or decrement should range only from +1 to +6 or -1 to -6. A value of 1 or -2 will print as 8 point font size, 2 or -1 will print as 10 point font size, 3 or +0 will print as 12 point font size, 4 or +1 will print as 14 point font size, 5 or +2 will print as 18 point font size, 6 or +3 will print as 24 point font size and 7 or +4 will print as 36 point font size.

STYLE  See Cascading Style Sheets (CSS) information.

Back to Top