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

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

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Full Schedule
g
g HTML Site

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 →

|


This site needs an editor - click to learn more!

Add The+HTML+Font+Tag to Twitter Add The+HTML+Font+Tag to Facebook Add The+HTML+Font+Tag to MySpace Add The+HTML+Font+Tag to Del.icio.us Digg The+HTML+Font+Tag Add The+HTML+Font+Tag to Yahoo My Web Add The+HTML+Font+Tag to Google Bookmarks Add The+HTML+Font+Tag to Stumbleupon Add The+HTML+Font+Tag to Reddit




RSS | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


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


Content copyright © 2014 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 BellaOnline Administration for details.

g


g features
What's Coming in HTML 5

What is FTP?

HTML Fundamentals - Tables

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


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


BellaOnline Editor