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

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

g

The HTML Body Tag - Setting The Colors - 3
Guest Author - Diane Cipollo

Open the webpage you created in lesson one (Template1.html) with your text editor. Go to the body tag and add these attributes.

<body bgcolor text link alink vlink>

Now you will make the background color of the page black, the text orange, the links white, the alinks red and the vlinks yellow. Don't forget the quotation marks.

<body bgcolor="#000000" text="#ffa500" link="#ffffff"
alink="#ff0000" vlink="#ffff00">
Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

Now just for fun, change the Hello World to Happy Halloween. Also let's add a link. Do not worry about the details now, just copy this code onto your webpage.

<a href="TestPage.html">Click this link</a>


Your webpage code should now look like this.

Template2.html - source code

<html>
<head>
<title>Happy Halloween</title>
</head>

<body bgcolor="#000000" text="#ffa500" link="#ffffff"
alink="#ff0000" vlink="#ffff00">

Happy Halloween <a href="TestPage.html">Click this
link</a>

</body>
</html>
Note--The arrow indicates that the code is wrapped to a second line and should really be all on one line.

Before you can check out this new webpage, you have to save the changes. Click File > Save As and name the new page Template2.html. Don't forget to save the page in plain text format. Because we created a link that will take you to a second webpage called TestPage.html, we need to create this page also. Open a new blank page in your text editor. Click File > Save As again and name this blank page TestPage.html. You should now have two new webpages in your MyWebsite folder, Template2.html and TestPage.html.

Go to your MyWebsite folder and click on the Template2.html file. The web browser will open this webpage. It will have a black background and an orange Happy Halloween. The link will be white. When you click on this link to go to the second page, hold down your mouse button so that you can see the link change color from white to red. After you are on the second page (TestPage.html), close the browser window. Go back to your MyWebsite folder and click on Template2.html again. As you can see the link is now yellow because you have already visited the TestPage.html page.

In the next lesson we will discuss the other attributes associated with the body tag and you will learn how to create a patterned background on your web page.

← Back

|



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
How To Set Up a Mailto Link

Using CSS to Set a Background Image

Choosing the Right Font, Part Two

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