Font Tag

Use font tag and attributes to control color and size of text.


In contrast to the text formating tags based on logical styles, FONT is a newer tag that controls text in a way more similar to traditional word processors.

The basic tag looks like this: <FONT>text to format</FONT>

First you can control font size this way: (notice which is big and which is small)

<FONT SIZE="1">Size 1</FONT> <FONT SIZE="4">Size 4</FONT> and <FONT SIZE="6">Size 6</FONT>

First you can control the type of the font this way: (the user must have the font too)

<FONT FACE="TIMES">Times</FONT> and <FONT FACE="ARIAL">Arial</FONT>

Finally, you can control the color of the font this way: (this works the same as background colors)

You can use the color codes:

<FONT COLOR="#FF0000">FF0000</FONT> <FONT COLOR="#0000FF">0000ff</FONT>

Try changing the color code RED, GREEN, BLUE FF FF FF is white, 00 00 00 is black, FF 00 00 is red, 00 FF 00 is green

Or you can use the names of colors too:

<FONT COLOR="Red">Red</FONT>

The font tag is most powerful when used with many settings:
<FONT SIZE="4" FACE="TIMES" COLOR="RED">Big Red Times</FONT>

Finally, you can control the color of text throughout a page and the links this way:

<BODY TEXT="#000000" LINK="#0000FF" ALINK="#FF0000" VLINK="#660099">

LINK=Link, ALINK=Active Link, VLINK=Visited Link

Here is a further reference about fonts: http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/font.html

Here is an example HTML page for you to look at.
(use view source in your browser).

See Font Formatting Castro pp. 43-56 (alt. pp. 45-52)
See Link Colors Castro p. 123 (alt. p. 133)


Lesley ECOMP 6009   © 1999 Mary Hopper mehopper@world.comUpdated 12/01/99