About J & D Graphics
The J & D Graphics Gallery
J & D Graphics HTML Guide
J & D Graphics JavaScript Centre
Submit your work!
E-Mail Contacts
J & D Graphics Disclaimer
 

J & D Graphics HTML Guide

Basic HTML Guide - Part Two: The Basic Tags

The next, and by far one of the most important HTML tags is the <BODY> tag. Not only does it tell the browser what is to go on the page, it allows you to define the basic colours of the background, text and links on your page. I will cover each one of these in turn. The <BODY> tag is one of the last tags to be closed in the HTML file, so therefore the </BODY> line goes on the line above the </HTML> tag.

Defining the Background colour and/or image

The background colour of a webpage is defined using the BGCOLOR="#..." command. Between the quotes, you place a six digit Hexadecimal number. This is a number system which counts up as follows: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,A1,A2,A3... and so on.

HTML Colours

The colour definitions used in HTML are a set of 3 two digit numbers, representing the amount of Red, Green and Blue in the colour. This can be a little difficult to get used to to start with, but with practice you will become more used to them. The coloues are layed out inside the tags in the following manner: RRGGBB

A good rule to remember is that FF is the maximum amount of a colour and 00 is the minimum. Therefore bright red is FF0000, and the colour appears to be RED. Using the rules that govern natural light, FFFFFF (the maximum amount of all the colours) will be white, while 000000 (no colour at all) will be black.

Going back to our example, enter this line into the code:

<BODY BGCOLOR="#FFFF00">

</BODY>

The page should now look like this: Close the new window after you have finished, and move onto the next page. Try using different combinations of the colours, and see what your results are.

<-----Previous Next----->

 

 

   

[ - About - Gallery - HTML Guide - JavaScript - Subs - ]
[ - E-Mail - Disclaimer - ]