HTML 3.2 by Example

Here's how a basic HTML document can look like:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 //EN">

<HTML>

  <BASEFONT SIZE="3" COLOR="black" FACE="Arial, Helvetica">

  <HEAD>

   <BASE href="http://host_name/file_name" TARGET="_self">

   <TITLE>The title</TITLE>

   <META NAME="Keywords" CONTENT="keyword1, keyword2">
   <META NAME="Description" CONTENT="textual description">
   <META NAME="Author" CONTENT="Oleg K.">
   <META NAME="Expires" CONTENT="Tue, 22 Apr 1997 23:30:00 GMT">

  </HEAD>

  <BODY BGCOLOR="#FFFFFF" TEXT="#2O2O2O" LINK="#990000" VLINK="#404040" ALINK="#990000">

   The actual contents of the document

  </BODY>

</HTML>

 

Your document can have any name, followed with an extension .htm (for Windows and DOS users) or .html (for the rest of the world).

The text between the <TITLE> and </TITLE> tags appears in the title bar of the browser window. Making the title concisely describe the purpose of the page makes it easier for users to navigate between multiple windows that they might want to work with.

You can use whatever colors you like as value for the following BODY element attributes: BGCOLOR (background color), TEXT, LINK (hyperlink), VLINK (visited link), ALINK (active link - i.e. link at the moment it's being clicked). For color choices, see my JavaScript-powered color picker.

You can also use an image to tile your background of. You have to specify such information in your BODY element by using the BACKGROUND attribute:

   <BODY BGCOLOR="#FFFFFF" BACKGROUND="tile.gif" TEXT= ...(etc.)>

Please note that it is a good idea to use a BGCOLOR attribute to specify a color, which sould be close to the main color of your background. This is done in order to safeguard your page in case the image that you use to tile your background is not loading for any reason. For more information, see the sections on images and on hyperlinks.