Netscape 1.0 (and above) and Microsoft's Internet Explorer support different sized fonts within HTML documents. This should be distinguished from Headings.
The element is <FONT SIZE=value>
. Valid values range from 1-7. The default FONT
size is 3. The value given to size can optionally have a '+' or '-' character in front of it to specify that it is relative to the document BASEFONT
. The default BASEFONT
is 3, and can be changed with the <BASEFONT SIZE ...>
element.
<FONT SIZE=4>changes the font size to 4</FONT>
<FONT SIZE=+2>changes the font size to BASEFONT SIZE ... +2</FONT>
Internet Explorer and Netscape support the ability to change the font colour as well as face type. They use COLOR and FACE attributes to the <FONT>
element.
COLOR = #rrggbb or COLOR = color
The colour attribute sets the colour which text will appear in on the screen. #rrggbb is a hexadecimal colour denoting a RGB colour value. Alternately, the colour can be set to one the available pre-defined colours (see <BODY BGCOLOR=...>
). These colour names can be used for the BGCOLOR, TEXT, LINK,
and VLINK
attributes of the <BODY>
element as well. NOTE : The use of names for colouring text is currently only supported by the Internet Explorer and Netscape. Also, it should be noted that HTML attributes of this kind (that format the presentation of the content) can also be controlled via the use of style sheets.
Example:
<FONT COLOR="#FF0000">This text is red.</FONT>
or
<FONT COLOR="Red">This text is also red.</FONT>
would render as :
This text is red
FACE=name [,name] [,name]
The FACE
attribute sets the typeface that will be used to display the text on the screen. The type face displayed must already be installed on the users computer. Substitute type faces can be specified in case the chosen type face is not installed on the customers computer. If no match is found, the text will be displayed in the default type that the browser uses for displaying 'normal' text.
Example:
<FONT FACE="Courier New, Comic Sans MS"> This text will be displayed in either Courier New, or Comic Sans MS, depending on which fonts are installed on the browsers system.
</FONT>
NOTE : When using this element, care should be taken to try to use font types that will be installed on the users computer if you want the text to appear as desired. Changing the font face is only supported by Netscape and Internet Explorer, while Internet Explorer can also set font sizes/colours/faces within a style sheet. Also note that in a document whose layout/colouring etc., is defined in a style sheet, using the <FONT>
element will have no effect.