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:
and these icons:
Support: 2.0, 3.0, 3.2 1.1+ 1.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.
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.
Willcam's Comprehensive HTML Cross Reference was created as a service to the Internet community, and forms part of Willcam's Internet and HTML curriculum. It represents a joint effort of The Willcam Group and Gregory Consulting and is Copyright 1995 and 1996, The Willcam Group Limited. Please report any errors or omissions to Kate Gregory.
<BASE HREF=
"base address">
<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:
_blank
- Will cause the link to be loaded into a new blank window.
_self
- Will cause the link to be loaded into the same window the link was in.
_parent
- Will cause the link to be loaded into the parent of this document.
_top
- Will cause the link to be loaded into the full body of this window.
<BODY>
document-body</BODY>
<BODY BACKGROUND=
"URL">
document-body</BODY>
<BODY BGCOLOR=
"#rrggbb">
document-body</BODY>
<BODY BGCOLOR=
"colorname">
document-body</BODY>
<BODY TEXT=
"#rrggbb">
document-body</BODY>
<BODY TEXT=
"colorname">
document-body</BODY>
<BODY LINK=
"#rrggbb">
document-body</BODY>
<BODY LINK=
"colorname">
document-body</BODY>
<BODY ALINK=
"#rrggbb">
document-body</BODY>
<BODY ALINK=
"colorname">
document-body</BODY>
<BODY VLINK=
"#rrggbb">
document-body</BODY>
<BODY VLINK=
"colorname">
document-body</BODY>
margin
<BODY LEFTMARGIN=>
document-body</BODY>
margin
<BODY TOPMARGIN=>
document-body</BODY>
document-body
<BODY BGPROPERTieS="FIXED"></BODY>
The body tag introduces the body of the document. It should appear after the head section and occupy the remainder of the document.
The BACKGROUND attribute specifies an image file to use as the background for the page.
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:
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.
The LEFTMARGIN and TOPMARGIN attributes set the margin at the left and top of the document, in pixels.
The BGPROPERTIES attribute causes the background image (set with the BACKGROUND attribute) to remain fixed as the document scrolls: a watermark effect.
Support: | 3.2 | 2.0+ |
<DIV ALIGN=
align>
<DIV CLASS=
class>
<DIV CLASS=
classNOWRAP>
clear
<DIV =>
lang
<DIV =>
LANG=iso
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.
<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.
<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.
<ISINDEX>
URL
<ISINDEX HREF=>
<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.
<LINK REL=
relationshipHREF="
URL">
relationship
<LINK REV=HREF=
"URL">
<LINK REV=
relationshipHREF=
"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.
Browsers use this tag to build custom toolbars for the document.
REL=Home
REL=ToC
REL=Index
REL=Glossary
REL=Copyright
REL=Up
REL=Next
REL=Previous
REL=Help
REL=Bookmark
TITLE
attribute is used to label the bookmark. REL=Banner
REL=StyleSheet
<META HTTP-EQUIV=
"HTTP header field name"CONTENT=
"field value">
"HTTP header field name"
<META HTTP-EQUIV=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:
HTTP-EQUIV="REFRESH"
META HTTP-EQUIV="Content-Type" CONTENT="text/html" charset=
"charset"
<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.