HTML Tutorials‎ > ‎

Backgrounds

NOTE: This is the old way of defining the look & feel of webpages. The newer & better way is through CSS. However, this is an HTML tutorials series, so here we go. Here's a useful HTML5 cheatsheet by Matt at OnLastBlog.com

For starters, we need the <body> tag. This is where all your web page info goes, content, images, etc. But, for now, we will focus on the tag. Your background color & background image info will go within this first tag.

First let's focus on the background color. Here's an example of how the tag will look:
<BODY BGCOLOR="#FFFFFF">

Notice:  BGCOLOR, that stands for BackGroundCOLOR We're using hexadecimal code here to get our BGCOLOR. In this case, our  BGCOLOR is white (#FFFFFF), but we can make it any color we want.

In fact, if your going to use a background image, it's a good idea to make your  BGCOLOR the same as the dominating color in your background image, so your text is still legible while the background is loading.

Now, for that background image. This tag atribute is pretty much self-explanatory:
<BODY BACKGROUND="image.gif">

After you upload an image & it's stored in your websites directory, the image is given its own URL. Then all you have to do is put the image's URL in where it says image.gif. Cool, huh?

Well, I hope this sheds some light on how to use background colors & background images.

Here's some great resource sites for web development that I've found: