SamR's Quick HTML Reference

Last modified Tue Jan 27 09:39:45 CST 1998

Since I teach a variety of people about HTML, I find it appropriate to keep a simple reference to HTML handy, as much of the HTML documentation is either unwieldy or outdated. For example, the HTML 3.0 documentation runs over 190 pages, and the traditional HTML quick reference found at still contains many deprecated elements, such as <menu>.

Unfortunately, the time pressures of academic life have not given me sufficient opportunity to flesh-out all of this document. Nonetheless, both my students and I find it of some use, particularly in the electronic form.


HTML, the hypertext markup language is a common language for building hypertext documents for the World-Wide Web. Originally, authors had to build their documents in "raw HTML" because no tools were available. Now that such tools are available, many people no longer directly write HTML. Nonetheless, there a good reasons to learn HTML, particularly because it helps you understand what is and is not possible on the web.

More recently, other markup languages have been developed and extensions to HTML have been added. These other languages and extensions are not covered in this document (at least not yet).

Note that HTML is a markup language, not a programming language. What's the difference? A markup language indicates information about the structure of data; a programming language indicates information about the execution of a process (more or less).


In HTML, textual elements are traditionally surrounded by tags, although there are some tags that act as text elements. A piece of marked-up text looks something like

<TAG>some text</TAG>

In addition, certain tags may have attributes. For example, in NetScape's version of HTML, items in a list may indicate the type of mark that accompanies the item. In such cases, a piece of marked-up text looks something like


For example, one might indicate the title of a document with

<title>SamR's Quick HTML Reference</title>

Similarly, one might describe a table with a larger border with

<table border=10> ... </table>

Structure of HTML documents

Each HTML document is broken into two pieces:

As one might expect, the head is surrounded by <head> and </head> tags, and the body is surrounded by <body> and </body> tags. NetScape extends the body tag with a background attribute. I feel that this makes documents unreadable, but your mileage may vary.

In addition, the whole document should be surrounded by <html> and </html> tags.

A basic HTML document might therefore appear as follows:

<title>A basic HTML document</title>
This is the only line in the document.

Components of the head

Paragraphs in HTML


HTML uses a hierachical heading system, with labels from <h1> to <h6> Much of the documentation suggests that you only use them in order. For example, you should always begin your documents with an h1 tag and you should never use an h3 tag without a surrounding h2 tag.

Text Styles

Graphic elements

Links and anchors

Lists in HTML

Tables in HTML


Index of HTML Tags

Samuel A. Rebelsky,