Our tag for this discussion is the BODY tag.
We have a basic web page started, but our page form so far has an empty <body>. It's time to dress up your page by adding attributes to the body tag.
New Concept: attributes
None of our tags so far have attributes. (In CSS, they are called "properties".) Attributes provide more informartion about a tag. They are like adjectives. All attributes are optional, but most have default values.
Attributes have the form: attribute="value"
Rules:
All body attributes go in one body tag.
State all values in quotation marks.
Attributes may be in any order.
Use a space between the tag and an attribute.
Use a space between attributes.
Let's give our page a color first.
Background Color: bgcolor="..." will determine the basic color of your page. Use a color name or a hex code.
Examples:bgcolor="black"
bgcolor="#000099"
<body bgcolor="#ffff00">
If you want to use an image for your whole page, you can add
background="URL_of _image"
The background image will be seen on top of your bgcolor.
Examples:background=<http//:www.myhost/myaccount/sailboat.gif<
<body bgcolor="#ffff00" background="kitty.gif">
If your background image is not as wide as your page, it will tile (repeat) toward the right of your page to fill it up.
If your background image is not as high as your page, it will tile (repeat) toward the bottom of the page to fill it up.
If you use a background image, choose a bgcolor that is complimentary to your image. This color will be seen until the background image loads.
Choose a color for your text: text="..."text="white"
text="#FFFFCC"
<body bgcolor="white" text="black">
Finally, let's choose our link colors. There are 3.
Link: link="..." sets the color for links to pages that have not been viewed.
Visited Link: vlink="..." sets the color for links to pages that have been viewed.
Active Link: alink="..." sets the color a for link that is being activated as you click on it.
WebTV/MSNTV does not see this.
<body bgcolor="black" background="stars.jpg" text="white" link="lightblue" vlink="lightgray" alink="gray">
Happy Coding!
Gnubee