The Comprehensive HTML Cross Reference

HTML Toplevel Tags

This document describes tags that affect an entire web page or, like the division tag, a large part of one.

Click here to skip over the explanatory material at the top of the page and jump straight to the tags.

This table:

Support: HTML:2.0, 3.0, 3.2  Netscape:1.1+  MS Explorer:1.0+
and these icons:
(HTML 3.0 Only) (HTML 3.2 Only) (Netscape Extension) (Microsoft Extension) (Microsoft Extension 3.0)

alert you to tags and attributes that are not supported by all browsers. The support page explains the table and the icons in detail.

CDI Home Page

Finding your way around...

Not all HTML tags are in this single file. The comprehensive list has been split into the following eight categories:

We have also provided several indexes to help you navigate through this reference. In addition to our main indexes (the compact index and the complete index), there are four other indexes that list the tags according to the standards and browsers that support them.

CDI Home Page

The Comprehensive HTML Cross Reference was created as a service to the Internet community. It represents a joint effort of Scott Williams of CDI Corporate Education Services and Kate Gregory of Gregory Consulting and is fully protected by Copyright © 1995 - 2001. Please report any errors or omissions to Kate Gregory.

CDI Home Page


<BASE HREF="base address">
(Netscape Extension) (Microsoft Extension 3.0) <BASE TARGET="default target">

The base tag, which is valid only in the HEAD section, defines the base address of an HTML document, which is used to determine the full address of relative URL's that appear in the document. The typical use for this is to move an HTML document to another site without moving all the images and related documents with it: the base URL can be set to the directory where those images and documents remain. The "default target" will become the target for all links unless specified explicitly. The following are the predefined target names:

Will cause the link to be loaded into a new blank window.
Will cause the link to be loaded into the same window the link was in.
Will cause the link to be loaded into the parent of this document.
Will cause the link to be loaded into the full body of this window.

CDI Home Page


<BODY> document-body </BODY>
(HTML 3.2 Only) <BODY BACKGROUND="URL"> document-body </BODY>
(HTML 3.2 Only) <BODY BGCOLOR="#rrggbb"> document-body </BODY>
(HTML 3.2 Only) <BODY BGCOLOR="colorname"> document-body </BODY>
(HTML 3.2 Only) <BODY TEXT="#rrggbb"> document-body </BODY>
(HTML 3.2 Only) <BODY TEXT="colorname"> document-body </BODY>
(HTML 3.2 Only) <BODY LINK="#rrggbb"> document-body </BODY>
(HTML 3.2 Only) <BODY LINK="colorname"> document-body </BODY>
(HTML 3.2 Only) <BODY ALINK="#rrggbb"> document-body </BODY>
(HTML 3.2 Only) <BODY ALINK="colorname"> document-body </BODY>
(HTML 3.2 Only) <BODY VLINK="#rrggbb"> document-body </BODY>
(HTML 3.2 Only) <BODY VLINK="colorname"> document-body </BODY>
(Microsoft Extension) <BODY LEFTMARGIN=
margin> document-body </BODY>
(Microsoft Extension) <BODY TOPMARGIN=
margin> document-body </BODY>
(Microsoft Extension) <BODY BGPROPERTieS="FIXED">

The body tag introduces the body of the document. It should appear after the head section and occupy the remainder of the document.

(HTML 3.2 Only) The BACKGROUND attribute specifies an image file to use as the background for the page.

(HTML 3.2 Only) The BGCOLOR, TEXT, LINK, ALINK, and VLINK attributes specify the colours to be used for the background, text, links, active links, and visited links respectively. (An link is active for the moment the user clicks on it, and changes colour to confirm it has been clicked.) rrggbb is a six digit hexadecimal number with the first two digits specifying the red value, the middle two the green value, and the last two the blue value. Some sample colour values:


(HTML 3.2 Only) Colour names can be used wherever colours can be used: in the BGCOLOR, TEXT, LINK, ALINK,and VLINK attributes. Valid colours are: Aqua, Black, Blue, Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal,Yellow, and White.

(Microsoft Extension) The LEFTMARGIN and TOPMARGIN attributes set the margin at the left and top of the document, in pixels.

(Microsoft Extension) The BGPROPERTIES attribute causes the background image (set with the BACKGROUND attribute) to remain fixed as the document scrolls: a watermark effect.

CDI Home Page

Support: HTML:3.2 Netscape:2.0+ MS Explorer:No Support

<DIV ALIGN=align>
(HTML 3.0 Only) <DIV CLASS=class>
(HTML 3.0 Only) <DIV CLASS=class NOWRAP>
<DIV =
<DIV =
Indicates the ISO standard language. Enter the standard abbreviation to indicate the language of the element.

The division tag is used to divide a document up into different sections, such as chapters, sections, abstract, and appendix. The CLASS attribute specifies what section this is. The ALIGN attribute can be one of LEFT, RIGHT, or CENTER. The NOWRAP attribute stops the browser from wrapping except where <BR>'s are included in the document.

CDI Home Page


<HEAD> head-section </HEAD>

The head tag introduces text that describes an HTML document. Most documents have only a TITLE tag in the head section.

CDI Home Page


<HTML> entire-document </HTML>

The HTML tag defines an HTML document. The <HTML> tag should be the first in the entire document, and the </HTML> tag should be the last.

CDI Home Page

Is Index

(HTML 3.2 Only) <ISINDEX PROMPT=prompt>

The isindex tag, which is only valid in a HEAD section, declares that the current HTML document is a searchable index. The user will be prompted for keywords to search for. A new URL will be formed by taking the base address of the current document and adding a '?' character to it, followed by the keywords separated by '+' characters. The URL attribute overrides the base address. The prompt attribute changes the prompt from the default one supplied by the browser.

CDI Home Page


<LINK REL=relationship HREF="URL">
relationship HREF="URL">
(HTML 3.2 Only) <LINK REV=relationship HREF="URL" TITLE="title">

The link tag appears within the HEAD section of a document. It has all the same attributes as the anchor tag. The main 3 attributes used are REL, REV and HREF. The REL attribute specifies the relationship between this document and the link. The REV attribute specifies a reverse relationship while the HREF attribute specifies the URL of the link. The following is a list of some of the current relationships. The TITLE attribute specifies an advisory title string.

Toolbar relationships

Browsers use this tag to build custom toolbars for the document.

Link points to home or top page in hierarchy.
Link points to a table of contents.
Link points to an index for the current page.
Link points to a glossary.
Link points to a page with copyright information for the current page.
Link points to the pages parent in the hierarchy.
Link points to the next page in a series of pages.
Link points to the previous page in a series of pages.
Link points to information that may further explain the page to the user.
Link points to a particular location within a long document. The TITLE attribute is used to label the bookmark.

Other relationships

This use achieves the effect that the BANNER tag will eventually provide.
Link points to a style sheet that will be used to render the current document.

CDI Home Page


<META HTTP-EQUIV="HTTP header field name" CONTENT="field value">
"HTTP header field name" NAME="field name" CONTENT="field value">

The meta tag, which is only valid in a HEAD section, declares HTTP meta name/value pairs that are associated with the HTML document. These are used to extend the HTTP header information returned by the HTTP server. The support of the meta information is HTTP server specific. If a name attribute is not specified the HTTP-EQUIV attribute is used as the name. This tag can also be used to trigger client side behaviour.

Here are some values and what they are used for:

(Netscape Extension) (Microsoft Extension)HTTP-EQUIV="REFRESH"
The browser will reload the page every "n" seconds. "n" the number of seconds is specified in the CONTENT attribute. If the attribute URL is specified the browser will load the page specified in it after the "n" seconds. This is referred to as client pull refreshing.
(Netscape Extension) META HTTP-EQUIV="Content-Type" CONTENT="text/html" charset="charset"
This enables different international character sets to be selected. Netscape supports the following character sets: "us-ascii", "iso-8859-1", "x-mac-roman", "iso-8859-2", "x-mac-ce" "iso-2022-jp","x-sjis", "x-euc-jp", "euc-kr", "iso-2022-kr", "gb2312", "gb_2312-80" "x-euc-tw", "x-cns11643-1", "x-cns11643-2", "big5"

CDI Home Page


<TITLE> title-text </TITLE>

The title tag, which is only valid in a HEAD section, defines the title of an HTML document. A title should be chosen that makes sense with no context; for example Introduction is a poor title since it contains no indication of the subject matter it discusses. Netscape displays document titles in the application's title bar and in bookmark lists.