Tag Archives: BGCOLOR

Task 5 – Coloured Backgrounds

Now that you’ve uploaded pages to the web server you have completed all the core tasks and have acquired the core skills necessary to maintain a set of web pages. The remaining tasks are designed to increase your HTML repertoire. You may prefer to continue developing your own pages and can refer to these tasks or to the “Beginners’ Guide to HTML” as you need to. The tasks are based upon what are normally the most desired effects that people want to incorporate in their web sites as soon as they can.

Netscape uses a mid-range grey as the default background colour for web pages. This colour is very suitable for highlighting the 3D effects that are part of HTML rules and tables and is actually a very good backround colour. Nevertheless, most people want to choose something a bit livelier or which will better reflect the ethos or personality of the web site they are designing.

Changing the background colour is also a very resource-efficient change to make as it does not send any graphic files to Netscape or other web browsers, it simply instructs the browser to use a certain colour as its background colour. Here’s how to do it…

Step 1. The HTML tag for changing the background colour is actually part of the <BODY> tag which is extended slightly to include a BGCOLOR element. Here’s the tag when it sets the colour to white, like all the task pages on today’s course; <BODY BGCOLOR=”FFFFFF”>.

Remember there is only ONE <BODY> tag in a web page. It appears near the very top.

Step 2. Preview your page.

Step 3. The strange looking codes that set the colour are hexadecimal numbers (numbers to base 16) and changing the hexadecimal number changes the colour. Below is a list of some common colours and the hexadecimal numbers to obtain them. Try adjusting your new <BODY BGCOLOR=”FFFFFF”> tag by substituting some of these numbers and then previewing your page. (The ‘#’ symbol that appears in the codes below is optional. It means ‘what follows is a hexadecimal number,’ but can be omitted.)

BGCOLOR=”#000000
BGCOLOR=”#0000DD
BGCOLOR=”#0099FF
BGCOLOR=”#33CC33
BGCOLOR=”#99FF66
BGCOLOR=”#DD0000
BGCOLOR=”#FF3366
BGCOLOR=”#FFFF00
BGCOLOR=”#FFFF66
BGCOLOR=”#000000
BGCOLOR=”#663300
BGCOLOR=”#990099
BGCOLOR=”#FF0024
BGCOLOR=”#555555
BGCOLOR=”#777777
BGCOLOR=”#FFFFFF (white)