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

Autism Spectrum Disorders: 4:00 PM

Full Schedule
g
g HTML Site

BellaOnline's HTML Editor

g

The HTML Font Tag - 2

Guest Author - Diane Cipollo

The last attribute we will talk about is the color attribute. HTML handles colors with 6-digit (hexadecimal) codes. In the example, I have use the color code "#c00000" to make the text red. You can change the color of the text by changing the value of the color attribute on the right side of the equal sign. For more about color and the computer read How The Computer Sees Color.

You are probably asking yourself why you would use the color attribute and the font tag to set the text color when you have already set the text color in the body tag. You learned how to use the body in a previous tutorial. Say you want a word(s) on the page to be a different color from the color you have specified in the body tag. In this way they will stand out on the webpage. This is one example of when you would use the color attribute and the font tag. You would place the special words between the opening and closing font tags. The font tag will override your previous color choice (in the body tag) for only those words between the opening and closing font tags.

<font color="#00c000">Special Words</font>


Now let's put into practice what we have talked about. Open your source code for Template4.html into your text editor. Add the words "Enter Here" under the "Hello World" (the Hello World that is in the body of the webpage and not the <title>). Let's also set the face attribute to Arial, the size attribute to 5 and make these words orange in color (# f76a03). The code for these changes is in the box below. Now save these changes and name your new file Template5.html.

Template5.html - source code
<html>
<head>
<title>Hello World</title>
<meta name="keywords" content="quilts,quilting,
quilt fabrics,quilt patterns,quilt batting,
quilting books,applique,picture quilts,quilt blocks">
<meta name="description" content="Quilting site for
quilters of all types. Resources for supplies, lessons,
information and help, friendship and discussion.">
</head>
<body>
Hello World
<font face="Arial" size="5" color="#f76a03">Enter
Here</font>
</body>
</html>
Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

← Back

|


This site needs an editor - click to learn more!

Add The+HTML+Font+Tag+%2D+2 to Twitter Add The+HTML+Font+Tag+%2D+2 to Facebook Add The+HTML+Font+Tag+%2D+2 to MySpace Add The+HTML+Font+Tag+%2D+2 to Del.icio.us Digg The+HTML+Font+Tag+%2D+2 Add The+HTML+Font+Tag+%2D+2 to Yahoo My Web Add The+HTML+Font+Tag+%2D+2 to Google Bookmarks Add The+HTML+Font+Tag+%2D+2 to Stumbleupon Add The+HTML+Font+Tag+%2D+2 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