martin2k

The BODY Tag

HomeForumTutorials Tags:
 
 

Name

Body

Description

This tag contains all the visible elements of the page i.e. text, images, tables etc.  It is contained within the HTML tag.

Attributes

Please note all of the effects produced with the following attributes can and should be achieved using style sheets.

ALINK

Specifies the colour of the active links in the page.

BACKGROUND

Specifies the background image.  To use a file on the same site use the local path e.g. background="background.jpg" or background="folder/picture.gif".  You can also use dots to play a file in the parent folder e.g. background="..\file.png".  To play a file on another site, use the full URL e.g.: background="http://www.martin2k.co.uk/comments/back.gif".

BGCOLOR

Specifies the background colour of the page.  If the BACKGROUND attribute is also used, the image will cover the background colour unless the background image contains transparent areas.

LINK

Specifies the colour of unvisited links in the page.

TEXT

Specifies the colour of text in the page.

VLINK

Specifies the colour of visited links in the page.

Defining Colours

Colours can be defined in this format: #RRGGBB where the values are in hexadecimal format.  E.g. #FF0000 is red.  Colours can also be defined with words e.g. red.

Related Tags

The BODY tag is used within the HTML tag.

Example

Code

<body alink="#808080" background="back.gif" link="#FF0000" text="#000000" vlink="#FFFFFF">
Page content
</body>


Please fill in the below form if you have any comments or additional information you want to add about the above information.  If you have any questions, please visit the ForumAny questions sent using this form will be ignored.

* - Mandatory

*Name: E-mail:

*Comments:

*Please type the following code (your comment cannot be accepted without it):


© Martin Allen 1999 - 2006.  Last updated Thursday 09 November 2006 10:03:10 PM -0000.