HTML

Home

Tutorials

Go to tag:

 

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 use a file in the parent folder e.g. background="..\file.png".  To use a file on another site, use the full URL e.g.: background="https://www.martin2k.co.uk/html/escortgti.jpg".

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>

© Martin Allen 1999 - 2017.  Last updated Monday 27 November 2017 22:20 +0000.