|
|
Body Tag Attributes
- The <BODY> tag allows you to define global color attributes
for the page. The following table outlines these attributes.
| Attribute |
Description |
| BACKGROUND |
Specifies a background image to use for the background of body
content. |
| BGCOLOR |
Specifies the color to be used as the background for body
content |
| TEXT |
Specifies the color of regular text within the body content |
| LINK |
Specifies the color of a link |
| ALINK |
Specifies the color a link turns when you are clicking on it |
| VLINK |
Specifies the color of a visited link |
- Let's take a look at an example. Consider the following code,
paying close attention to the <BODY> tag:
<HTML>
<HEAD>
<TITLE>Coloring Body Content</TITLE>
</HEAD>
<BODY BGCOLOR = "black" TEXT = "white"
LINK = "yellow" VLINK = "green">
<BLOCKQUOTE>
This is an example of a colored page. Notice that
the background is black and that regular body text
is white. Also notice that <A HREF =
"http://www.extropia.com">Visited Links</A>
turn green while
<A HREF = "http://www.fakedomain.com">Regular
Links</A> are yellow.
</BLOCKQUOTE>
</BODY>
</HTML>
- The figure below shows the output of the previous code in a web
browser
Coloring Body Content
Introduction to Web Design | Table of Contents
Defining Colors
|
|