Background Colours
HTML Tutorial - Change the background color of your web site
This tutorial will teach you how to change the background colour of your webpage.
Bgcolor
The attribute to change the background color of a web page is bgcolor, and it is placed in the <body> tag, as shown below:
<body bgcolor= "chocolate">
Now this would produce a page with a milk chocolate color background, and whilst there are a lot of named colours you could use (black, white, yellow, wheat, blanchedalmond, lightsteelblue to name but a few) I personally prefer to use hexadecimal values, which are based upon RGB values for the colours, which have 6 characters, the first two characters determine the amount of RED, the second two determine the amount of BLUE, and the final two numbers determine the amount of GREEN, the characters are on a scale from 0 to F (0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f) with 0 being no colour, and F being the strongest colour, so...
#FF0000 gives a strong red, whereas #440000 gives a weak red.
#00FF00 gives a strong green, and #004400 gives a weak green.
#0000FF gives a strong blue, and #000044 gives a weak blue.
Of course the fun comes when you mix them up!
#FFFF00 gives you yellow (mixing red and green)
#00BBBB gives a turquoise esque color (mixing green and blue)
#FF00FF gives a pink/purple color (mixing red and blue)
And of course, #000000 gives black (lack of an colour) and #FFFFFF gives white (all colours together)
Now as you can see, with 16 possible options for each of the 6 characters, there are a *lot* of possible combinations - the best way to find a one that you like is to experiment.
Conclusion
You now know how to change the background colour of your webpage!
I hope this came in useful!
Ask in the forum
if you have any suggestions or comments.
|