HTML Formatting and Colors - Background
(Page 5 of 6 )
Since we are on the topic of text and displaying it, I think it is a good time to discuss backgrounds. The way your text looks is heavily influenced by your background choice. If you try to display yellow text on a white background for instance, the user's eyes will likely explode. Likewise if you display a dark image and try to use dark text against that background, your text will be unreadable.
There are two choices when setting the properties of your background. You can use colors or an image.
Images as Backgrounds
You can get some cool effects using images for your background. It can also come out looking stupid if you're not careful. A few things to note: if the image is smaller than your page, the browser will tile the image over and over. If the image is larger than your page, it will make the page bigger, which can screw up your layout. And finally, if the image is too large, it will slow the speed of your page loading.
Here is how you make an image your background:
<html>
<body background="thisisyourbackground.jpg">
</body>
</html>
Using Colors as a Background
Your other option is to use colors for your background. You can do this with the following code:
<html>
<body bgcolor="#7FFF00">
</body>
</html>
Hurts your eyes right? Muahahah! Setting the background color is just that easy.
Well that is it for this tutorial. I will leave you with a table displaying all of the color values and their codes. See you in the next tutorial. Till then...
Next: Color Code Chart >>
More HTML Articles
More By James Payne