In the basic document we noticed that the browser shows the text between the opening and closing <body></body> tags. Tags are clever things because you can add other stuff inside the tags to get even more interesting things. To get the page colour, you can add a bit to the <body> tag as follows;
By the way, bgcolor stands for background colour. I only say this silly thing because for a while it didn't register with me! In the second example the bgcolor is "black." If you want to change the text colour, then add;
<body bgcolor="black" text="gold">
Now this colour stuff is a bit strange. Some browsers will recognise common colour names such as;
However, usually we would use a '#' followed by a six figure number. Don't get daunted here! You don't have to do this, your editor will do it for you, or you'll pick a colour name from the chart! This number describes the exact colour you want.
Most HTML editors will allow you to select a colour and the editor will put the numbers in for you. The alternative is to select the colours from a table which shows a picture and the hexadecimal colour code (I tried to avoid saying hexadecimal! I didn't want you know what a foul mouthed person I was! But I suppose the truth will out! You don't need to know what hexadecimal means, and if you aren't a mathematician, don't try. Just take it that this is a funny number with letters, or a code, that the HTML editor or a table gives you to make your own unique colour. Personally, I always use an editor that puts the number in for me.) This code gives a mixture of red, green and blue to make your special colour!
The background colour tag for this page is
There isn't a colour code for text, so the browser uses the default colour - black.
Have a look at the colour chart now!
If you want to add more variety or texture, then you can use a background image.
Most Recent Revision: 18-Oct-98.
I am always pleased to hear from you.