Backgrounds, Colors, and Other Nifty Stuff

Backgounds
Backgrounds for web pages come in two different types, solid colors, or images that are pannelled behind the text and images on the page. Both types fall into what is called the BODY extensions category. They are called "extensions" because they are added to your BODY command at the start of your page. To make a background a single solid color you use the bgcolor tag:

<BODY BGCOLOR=#RRGGBB>

The RRGGBB is a hexdecimal code for the red, green, and blue values of the color. For instance black is #000000, no color. White is #FFFFFF, pure color. Pure blue would be #0000FF. For a chart of the colors see John December's color codes chart.

As with this page though you can also have multicolored backgrounds or even pictures. This is because you can use any GIF or JPG image as a background picture using the background tag.

<BODY BACKGROUND="smiley.gif">

If the graphic is smaller than the screen, it will be tiled. That is, another copy of the picture will be put to the right and another below the first picture and each subsequent one until the entire "page" is covered. For example, if I use a smiley face graphic as the background the original graphic may look like:

While the tiled background would look something like:


Of course, for backgrounds you would want a graphic that is lighter in color than the smiley faces shown above, otherwise they make reading the words of your web page difficult. For the background of this web page, we used a very thin but long horizontal stripe with blue at one end. If you were able to expand your screen wide enough the blue stripe down the side would repeat itself but for most people it only apears down the left side of the screen.

Text Colors
Once you have your background set, then you may want to change the color of your text, hyperlinks, or even the color hyperlinks turn after you have visited them. Colors are also handled with the BODY extensions. The three tags are:

<BODY TEXT=#RRGGBB>
<BODY LINK=#RRGGBB>
<BODY VLINK=#RRGGBB>

Other Nifty Stuff
There are a number of things you can do on your web page. You can allow people to send you an email message. You can have a blank where they can enter text. You can have a pop down menu from which they can select an option. You can even have them run a program using either a cgi-bin script or a java script. As you can see, HTML, despite its humble ascii format, is a very powerful language. There are too many options for us to cover all of them here, but the information we have provided should help you begin creating you own web pages right away. To learn more about the fancier features there are a number of good online HTML manuals and several high quality published books as well. A good place it start is John December's Welcome to HTML and CGI Unleashed page.