HTML Body Tag - <body>
Description
The body tag marks the beginning and end of the page content. All page content is placed within the body tag.
Using attributes of the body tag you can set the background color, set the default text color, the default link color, and specify an image to display in the background of the page.
Examples
Red Text:
<body text="red">
content
tags
pictures
etc
</body>Give it a go!
Red background:
<body bgcolor="red">
content
tags
pictures
etc
</body>Give it a go!
Image background:
<body background="../images/title.png">
content
tags
pictures
etc
</body>Give it a go!
Blue links:
<body link="green">
content
tags
pictures
etc
<a target="_blank" href="www.yahoo.com">www.yahoo.com</a>
</body>Give it a go!
Attributes of the body tag
| alink |
#rrggbb color name e.g. red |
alink stands for 'active link'. This attribute sets the color of links while they are being clicked. |
| background |
url |
Specifies a url of an image to display in the background of the page. |
| bgcolor |
#rrggbb color name e.g. yellow |
Specify the background color of the page |
| link |
#rrggbb color name e.g. yellow |
Set the default color for all links in the page |
| text |
#rrggbb color name e.g. yellow |
Specify the default color of the all text in the page |
| vlink |
#rrggbb color name e.g. yellow |
vlink stands for visited link. This attribute sets the color of all visited links in the page. |