</HTML>

An Introduction to HTML


Format of an HTML Document

The Simplest HTML Page

HTML 3.2 Elements


Format of an HTML Document

An HTML document is made up of a a series of HTML elements, whose structure describe the logical format of a document. Some elements, such as the document head and document body elements, must be present in every HTML document. Others, such as the table, paragraph, and section heading elements, are used to provide the document's content, while others still, such as the strong, and underline elements, are used to modify the presentation of text within the document.

HTML elements can be separated into two categories, those which can contain other elements, and those which stand alone. Container elements are those elements which either provide a logical entity which itself has content, such as a paragraph or a table, or which modify the presentation of their contents.

Container elements are marked by both a start tag, consisting of the element's name between angle brackets (< >), and an end tag, consisting of a slash (/) character, followed by the element name, also within angle brackets. For example, to indicate that text should be emphasized, it is placed within the EM (emphasis) element:

	<EM> This text would be emphasized </EM>

Standalone elements, on the other hand, are used to create a single object, such as an image or a line break. Standalone elements have no content, and thus do not require an end tag. For example, to create a horizontal line, the HR (horizontal rule) element is used:

	<HR>

In addition, many elements accept, or even require, further information in order to function. Such information is passed to an element by including an attribute within the element's start tag. An attribute is a keyword, and possibly an equals sign (=) and a value. For example, the HR element can be told to draw a more two-dimensional line by passing it the NOSHADE attribute:

	<HR NOSHADE>

and can be given an alignment by specifying the ALIGN attribute, with a value of left, right, or center:

	<HR ALIGN="right">

Note that the value passed to an attribute should be enclosed in double quotes. Although this is not required for all values, it is always a good idea, as different browsers have different requirements for which types of attribute values require quotes. Note also that the names of elements and of attributes are not case sensitive. Many HTML authors indicate the names of elements entirely in capitals so as to better distinguish them from the surrounding text, however. Note that some older browsers do not deal well with element names in mixed-case, so you should stick to either all capital or all lower case letters.


The Simplest HTML Page

Every page you design must consist of at least the following elements:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
  <TITLE>Your Title Here</TITLE>
</HEAD>

<BODY>

</BODY>
</HTML>

This simple template provides all of the sections and elements required by the HTML 3.2 standard. Although it is technically valid to exclude some of the tags marking these elements, it is poor style to do so, and may confuse some browsers. The entire content of your page should be placed between the <BODY> and </BODY> tags (i.e. within the <BODY> element).

Thus, the elements which must be present in any HTML document are:

!DOCTYPE
This is not strictly an HTML element, but rather a marker in the SGML markup language indicating that the document that follows is an HTML document. As printed above, this line specifically indicates that the document complies with the final version of the HTML 3.2 standard and is in English. If you are writing a page in another language than English, EN can be replaced with the two-digit abbreviation of the documents language from ISO 630.
HTML
This is the outermost element in a valid HTML document. It's contents make up the actual page being presented.
HEAD
This element is used to present the HTML document's header, information about the document which should not show up within the actual document. Elements within the HEAD element can contain such information as the name and address of the author, or the last time the file was modified.
TITLE
The most important element in the header of an HTML document is the title. Most browsers will display the title of the current document in the title bar or in another prominent location, and most search engines and bookmark systems will refer to a document by its title. Note that the TITLE element may not contain other elements.
BODY
The body of an HTML document contains the actual content of the page being presented. Within the body, various elements can be used to present text, images, and formatting information to the browser.

HTML3.2 Elements

HTML 3.2 Elements Reference Page

The HTML 3.2 standard defines 70 elements which can be used in the design of a valid HTML document. The valid standard elements can be separated into several basic categories:

The HTML Element
This is the outermost element in a valid HTML document.
Top Level Elements
The HEAD and BODY elements, and the obsolete PLAINTEXT element. These are the elements which can appear directly within the HTML element.
Head Elements
These are elements which may appear in the header of an HTML document.
Headings
These elements are used to provide section headings within an HTML document.
The ADDRESS Element
This element is used to provide information about the author of an HTML document.
Block Level Elements
These elements provide objects such as paragraphs, tables, and lists, which can be used to structure the content of an HTML document.
Text Level Elements
These elements provide text formatting such as emphasis and underlining, and also provide elements which provide content within a document, such as images and line-breaks.
Applet Member Elements
Within an APPLET element, these attributes are used to provide information to a Java applet.
Form Member Elements
Within a FORM element, these elements are used to provide data fields, such as radio buttons and popup menus.
List Member Elements
Within the various list elements, these elements are used to provide list items.
Image Map Member Elements
Within a MAP element, these elements are used to provide client-side image maps.
Table Member Elements
Within a TABLE element, these elements are used to provide structured, formatted tables.
Deprecated Elements
These elements are obsolete, and are provided only for compatibility with older documents.

This page was last modified on May 9, 1999