HomeHelpSite indexFeedbackSearch
Yenza!

Building a website

Developing a website
General discussion
of site


Learning HTML

Required Tags

Basic layout and
formatting tags


Hypertext links

Images

Tables

Fonts

Planning and building

Going live

HTML editors

Web
development
resources


Ongoing skills
development


Web databases

Learn to use the Internet

Start your research

Yenza! for trainers

The Internet for training

Subject links
Learning HTML

Fonts

This section looks at:


Font size

Font size can be changed by using the <FONT SIZE> tag.

Font sizes can range from 1 through 7:

HTML Coding Display
<FONT SIZE="1">One </FONT> One
<FONT SIZE="2">Two</FONT> Two
<FONT SIZE="3">Three</FONT> Three
<FONT SIZE="4">Four</FONT> Four
<FONT SIZE="5">Five</FONT> Five
<FONT SIZE="6">Six</FONT> Six
<FONT SIZE="7">Seven</FONT> Seven

These sizes are relative, not absolute. "1" will always be the smallest font, and "7" the largest, but exact size will depend on the browser and on the user's settings.


Font face

The font most commonly used by default is Times New Roman. Font face can be changed by using the <FONT FACE> tag. For example:

HTML Coding Display
<FONT FACE="Arial">Arial</FONT> Arial
<FONT FACE="Comic Sans MS">Comic Sans MS</FONT> Comic Sans MS
<FONT FACE="Courier">Courier</FONT> Courier
<FONT FACE="Times New Roman">Times New Roman</FONT> Times New Roman
<FONT FACE="Verdana">Verdana</FONT> Verdana

Bear in mind that older browsers such as Netscape 2 do not display fonts other than the default, and that even newer browsers can only display fonts already on the user's computer.


Font colour

Font face can be controlled by using the <FONT COLOR> tag with the desired hexadecimal value:

HTML Coding Display
<FONT COLOR="#FF0000">Red</FONT> Red
<FONT COLOR="#009900">Green</FONT> Green
<FONT COLOR="#0000FF">Blue</FONT> Blue

Note the hash sign (#) before the hexadecimal value and the American spelling "color".

Color Center lets you experiment with coloured text and backgrounds and lists their hexadecimal values: http://www.hidaho.com/colorcenter/cc.html


Multiple font attributes

The following example shows how to control font size, face and colour at the same time:

HTML Coding

<font size="4" face="Arial" color="#FF6600">
The font used in this sentence is size 4 Arial orange.
</font>

 

Display

The font used in this sentence is size 4 Arial orange.



Future of the <font> tag

The <FONT> element is "deprecated" in the HTML 4 specification, which means that it is likely to be dropped from future versions of HTML. Consider using style sheets to achieve control over font colour, face etc. See the Yenza! page on further Web development resources for links to Cascading Style Sheet resources:
http://www.nrf.ac.za/yenza/building/resource.htm

 


 

 
Top of the Page

Questions? Comments? Contact the site administrator.