Below is a sample template for an HTML document:

<html> <head> <title> This is a sample page </title> </head> <body bgcolor="#ffffff" link="#D9D919" alink="#FFFF00" vlink="#FF00FF"> </body> </html> The HEAD element.

This part of an HTML document is transmitted from the server to the browser before the rest of the document. For this reason, there are some special bits of information that you will sometimes include in the header of a document. We'll go into that later.

For now, all you need to put in the HEAD of your documents is a title, as illustrated above.

The BODY element.

Basically everything else in your document besides the title goes inside the BODY tags.

Some nifty modifiers on the BODY tag itself are illustrated here:

bgcolor
The background color of a document. Normally specificed in a hexadecimal RGB value. More on that later.
background
The name of a graphic file to use as a background.
link
What color should link objects be.
alink
What color should links be while the user is clicking them.
vlink
What color should links be after they've been visited.

Hex numbers are sort of a pain in the booty to determine, but luckily there are several handy sources where you can find out the information. HTML Color Picker is a nifty Java applet which will also help you find hex numbers.

If you want to specify a background image, use the following syntax:

<body background="/~boom/gif/tile.gif">

Background images vs. background colors examples.

There are some neat things you can do with background images if you don't mind playing around with Photoshop for a while. If you make a pretty background that will look good tiled over and over, you can come up with a visually interesting background that doesn't take up much space. For example, you could make a gradient between two colors, save it as a JPEG, resize it to be one pixel high, and use it as a background. Similarly, you can make a GIF with a nice pattern, or series of colors, do a similar resize, and you have the visual background for a nav bar/content window split without the hassle of using tables or frames. You need to make some decisions about how big you want the browser window to be when you do this, otherwise you may get an unappealing tile at the right side of the window.
Building Web Sites - ITP Fall 2000 - Mike Cosaboom, Instructor
mc39@acf2.nyu.edu