These tags play an important role in the way your page looks and stands out. Changing the background and the colours of both the text and the links on a page can completely alter the atmosphere it creates.
The backround colour (or image) as well as the text and link colours have to be defined inside the <BODY> tag, not between the <BODY> and </BODY> tags.
- <BODY BGCOLOR="#??????"> - Background Colour. This is how the colour of the background of your page can be changed. The 6 question marks represent the numbers that make up the hexadecimal code for a particular colour. For a list of popular colours and their hexadecimal codes see the Colour Codes.
- <BODY BACKGROUND="url"> - Background. HTML documents can have either tiled patterns or background wallpapers. To do this you have to specify which image you require to be set as the background. Note: large wallpaper type backgrounds may cause pages to load slowly.
- <BODY TEXT="#??????"> - Text Colour. When using a different colour background, it is easier on the eyes if the text within the document is a colour that contrasts the background, but not too contrasting. To make all the text in the document a certain colour, it has to be declared in the <BODY> tag.
- <BODY LINK="#??????"> - Link Colour. The links, those things you click on to make you go places, can also be assigned a different colour. This is not usually necessary as the default colour for links is blue, and this will show up on most backgrounds.
- <BODY VLINK="#??????"> - Visited Link Colour. When someone has clicked on a link, gone somewhere and then come back again, the link you went to earlier will show up as a visited link, and to make life easier, especially when searching, visited links are displayed in another colour.
- <BODY ALINK="#??????"> - Active Link Colour. Sometimes links can be redirected to a new window, or a frame. When this is the case, the link you clicked on is still active as it is being viewed. This too is a different colour, and once again the default colour works well on most backgrounds, but to change you would do so within the BODY tag.
Note: All the above colour and background declarations must all be in one single BODY statement.
Example: Click Here to see the example
<HTML>
<HEAD>
<TITLE>This is the title of the 2nd example</TITLE>
<BODY BGCOLOR="#00009C" TEXT="#FFFF00" LINK="#FF1CAE" VLINK="#FF1CAE">
When you look at the example this text should be yellow and the link should be pink on a blue background!
</BODY>
</HTML>
http://www.htmlguide.findhere.com |
Copyright © 1999 Robert Duncan |