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

Clairvoyance: 08:00 PM

Full Schedule
g
g HTML Site

BellaOnline's HTML Editor

g

HTML Fundamentals - The Body Tag

Guest Author - Elizabeth Connick

HTML pages are divided into two main sections: the head area, and the body area. The body section is where all the ‘visible’ goodies go. This is the part of the page that your visitors actually see, so it’s important to get it right.

The body tag acts as a container for everything within the body section. It will look something like this:

<body>
Assorted HTML code goes here...
...
...
</body>

As with most HTML tags, you can add attributes that affect how everything within that tag looks. Since the body tag holds all of that page’s visible items, changing the body tag’s attributes will affect the entire page.

Note that all of the body tag attributes are now deprecated! If you want to change your page’s appearance, use CSS; it’s the approved way to format a webpage, and it has a great deal more flexibility and far more options for the website designer. Nonetheless, for a complete understanding of HTML you should be familiar with the body tag’s attributes – for one thing, you might come across a webpage one day that still uses them, and you’ll know how to fix it!

Without further ado, here are the body tag attribute options:

link: Sets the text color for all links throughout the page. You can either use one of the named colors, or specify a shade using hexadecimal code.

alink: Sets the color for active links on the webpage.

vlink: Sets the color for previously visited links.

text: Sets the color for all text on the page.

background: Lists an image file to use as the page’s background.

bgcolor: Specifies the page’s background color.

If you were to use these attributes, the body tag would look something like this:

<body text ="purple" alink="yellow" vlink="red" bgcolor="green" background="image.gif">
Assorted HTML code...
...
...
</body>

Be careful when setting the background attribute to list the image's file path correctly. If your image is in the same folder as your webpage, all you need to do is list the image name. Otherwise, you need to direct the browser to the proper folder on your server. If you're in doubt, it's best to use an absolute url (which looks something like 'http://www.domain.com/images/image.gif') so that it'll work correctly regardless of where the page is located.
This site needs an editor - click to learn more!

Add HTML+Fundamentals+%2D+The+Body+Tag to Twitter Add HTML+Fundamentals+%2D+The+Body+Tag to Facebook Add HTML+Fundamentals+%2D+The+Body+Tag to MySpace Add HTML+Fundamentals+%2D+The+Body+Tag to Del.icio.us Digg HTML+Fundamentals+%2D+The+Body+Tag Add HTML+Fundamentals+%2D+The+Body+Tag to Yahoo My Web Add HTML+Fundamentals+%2D+The+Body+Tag to Google Bookmarks Add HTML+Fundamentals+%2D+The+Body+Tag to Stumbleupon Add HTML+Fundamentals+%2D+The+Body+Tag to Reddit




RSS | Related Articles | 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 Elizabeth Connick. All rights reserved.
This content was written by Elizabeth Connick. 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