martin2k

The FONT Tag

HomeForumTutorials Tags:
 
 

Name

Font

Description

Defines the font colour, name (face), and size of text contained within the tag.  To keep the size of pages down (where the FONT tag is used excessively) and to keep a uniform look throughout the site, style sheets should be used instead.

Attributes

COLOR

Specifies the colour.  Colours can be defined in this format: #RRGGBB where the values are in hexadecimal format.  E.g. #FF0000 is red.  Colours can also be defined with words e.g. red.

FACE

Specifies the font.  You can use commas to separate multiple fonts - the browser will use the first one that is available on the system.

SIZE

Specifies the font size - from 1 (smallest) to 7 (largest).  The following table gives the equivalent sizes in pts:

SIZE Value Font size in pts
1 8
2 10
3 12
4 14
5 18
6 24
7 36

Example

Code

<font face="Verdana,Arial,Tahoma" size="5" color="orange">Sample Text</font>

Generates

Sample Text


Please fill in the below form if you have any comments or additional information you want to add about the above information.  If you have any questions, please visit the ForumAny questions sent using this form will be ignored.

* - Mandatory

*Name: E-mail:

*Comments:

*Please type the following code (your comment cannot be accepted without it):


© Martin Allen 1999 - 2006.  Last updated Thursday 09 November 2006 10:04:11 PM -0000.