To Temple College Class  logo R. Craig Collins > Web Page Design > HTML Font tag

HTML <font> © R. Craig Collins, 2005/6

Please note, this is a deprecated tag (being phased out)

If you have already read this page, you may jump down to the complete font example

The <font> </font> tag set is used in HTML 3 coding to change the attributes of a single word or phrase, whereas the <body text="..."> </body> tag/ attribute set the default value of the document's text color.

To modify a single word or phrase to be a different color than the default value, surround the text to be modified with the
<font color="..."> </font>
tag and attribute set.

Example

And <font color="blue">some text</font> goes here

would display as

And some text goes here.

Other attributes to use with <font > </font>

<font size="..."> </font> where the value is an absolute size, such as 4
(the default is 3, so size="4" would make the text slightly larger than the default),
or a relative size, such as "+1"
(this would make any surrounded text one size larger than it was before... including some text that already had the size altered).

You can also mix or match <font color="..."> </font>, such as
<font color="..." size="..."> </font>

Example

And <font size="+1">some <font color="blue">text</font></font> goes here

would display as

And some text goes here

Note, two <font> tags were used, so two </font> tags are required.
The size is increased for two words, and the color is changed for just one, based on where the tag was started.

The last attribute to use with <font > </font>

<font face="..."> </font>

Note, this changes the typeface of the characters, but MUST use a typeface installed on the USER'S computer... if they don't have the typeface specified, the browser will pick what IT thinks is close, and your page will look very different on the user's machine. Most Windows computers have Arial, Times Roman, Courier, etc., but Mac users do not. You can specify a series of typefaces to try, but you will still typically have users who can't see the page the way you do, so use this attribute VERY sparingly.

Example

<font face="Arial, Helvetica, sans-serif">Here is Arial</font> <br>
<font face="Courier New, Courier, mono">And some text</font> <br>
<font face="Times New Roman, Times, serif">goes here</font>

would display as

Here is Arial
And some text

goes here.

Note: the first line is typewriter style text, and the second line is newspaper style text.

Putting them together:
<font face="Times" color="blue" size="-1">Small blue Times</font>
would display as
Small blue Times