logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
Jokes & Riddles
Astronomy
Philosophy
Public Health
Canadian Culture


dailyclick
All times in EST

Tatting: 13:00 PM

Full Schedule
g
g HTML Site
Elizabeth Connick
BellaOnline's HTML Editor

g

The HTML Font Tag
Guest Author - Diane Cipollo

In the second part of this tutorial we will talk about how to control the look of the text on your webpage using the HTML font tag.

REVIEW:
In the previous tutorials in the HTML Basics Series, you learned that HTML tags are used to communicate with the web browsers in order to control how your webpage will look. And in the first part of this tutorial you learned about the typeface or font and how to choose a typeface or font for your webpage.


Now we will talk about the HTML font tag and how to use the font tag to control the typeface(font name), size, and color of the text on your webpage. Let's take a look at an example of the font tag.

<font face="Comic Sans MS" size="1"
color="#c00000">Example 1</font>
Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

<font face="" size="" color=""></font>
<left angle bracket
fontelement
faceThis attribute controls the typeface or font name for the text.
sizeThis attribute controls the size of the text on the webpage.
colorThis attribute controls the color of the text.
>right angle bracket


As with most HMTL tags, the font tag has an opening and closing tag. Any text between the opening (<font>) and closing (</font>) font tags will be controlled by that font tag. You can make a section of text on your webpage appear one way and give another section of text a completely different look by giving different values to the attributes of the font tag.

The first attribute for the font tag is the face attribute. This is the attribute you will use to specify your choice of typeface or the font name. In the example, I have chosen Comic Sans MS, which is a common font on the web. Therefore I set the value of the face attribute to Comic Sans MS on the right side of the equal sign. You can specify more than one font name by listing the names in order of preference and separating them with a comma.

<font face="Comic Sans MS, Arial">

The size attribute is used to control; you guessed it, the size of the text on the webpage. You can use the numbers from 7 (largest) to 1 (smallest). This is called absolute font sizing. We will talk about relative font sizing later. You can control the size of the text by changing the value of the size attribute on the right side of the equal sign.

<font size="1">Font Size 1</font>
<font size="2">Font Size 2</font>
<font size="3">Font Size 3</font>
<font size="4">Font Size 4</font>
<font size="5">Font Size 5</font>
<font size="6">Font Size 6</font>
<font size="7">Font Size 7</font>
Next →

|



RSS | Previous Features | Site Map


Content copyright © 2008 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Elizabeth Connick for details.

Digg! g delicious Save to Del.icio.us

g


For FREE email updates, subscribe to the HTML Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
Finding Images for Your Website

How To Set Up a Mailto Link

Using CSS to Set a Background Image

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Driving Amount
Much more
Slightly more
Slightly less
Much less

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2008 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor