Using Templates

Since all HTML documents share a similar global structure, there's no need to start from scratch each time you make a web page. It's more efficient to start from a generic template and customize it.

A template is simply a text file which contains the bare essentials of an HTML document. Here's an example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
            "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
  <TITLE> Untitled </TITLE>
</HEAD>
<BODY>

</BODY>
</HTML>

For your convenience, I've created a small library of templates which you can use. There are three steps to using these templates:

  1. Choose the template that is right for you.
  2. Copy the template and paste it into your text editor.
  3. Customize!

How to choose the right template

The template you choose will be dictated by the version of HTML you intend to author.

If you are just learning HTML, you might as well learn the latest version. I recommend that you author "strict" HTML 4.01. The strict version is also good if you're a stickler for orthodoxy.

However, if you have experience with an older version of HTML, you may wish to stick with what you know. You might author HTML 3.2, for example. (Note, however, that this tutorial is focuses on the strict version of 4.01.)

Many of the old tags used in version 3.2 are no longer "legal" in version 4. If you're familiar with version 3.2 but want to start using version 4, I recommend using "transitional" (or "loose") HTML 4.01. As the name implies, this allows you to use some of the old tags while implementing features of the new.

How to copy a template

Once you've decided what version of HTML you are going to use, follow the link (below) to the appropriate template, select all the text that appears in your browser window, copy it and paste it into the text editor of your choice.

How to customize your template

You should replace the word "Untitled" with the actual title of your document. You should also paste the raw text of your document between the <BODY> and </BODY> tags. Then continue to mark up the text with HTML as outlined in the tutorial.


| Introduction to HTML | Tutorials |