HTML Quick Reference

© Copyright SoftQuad Inc., 1995. This document may be reproduced in whole or in part provided that this copyright notice is reproduced on each copy made.

The authoritative source of information on the structure of HTML documents is the document HyperText Markup Language (HTML) Version 2.0. This section provides a short summary of this material. The rules governing the HTML format are quite flexible, and furthermore HoTMetaL will guide you through the document structure: therefore, the approach followed here will not be to enumerate all the possible combinations of elements. Rather, an overview of the structure will be presented, together with a discussion of the different groups of elements (emphasis, links, lists, etc.).

Overview

Block formatting

Character formatting

The following elements are used primarily for formatting inline text:

Line breaks

If you want to force a browser to break the current line in the text, insert a BR element. You can't type inside this element: it just causes a line break.

Horizontal lines

To cause the browser to print a horizontal line (rule) in your document, insert an HR element. HoTMetaL will display a line in your document, but individual browsers may print lines of different widths and lengths.

List elements

HTML supplies five list elements. With the exception of DL, list elements are composed of one or more LI (list item) elements.

You can nest lists by inserting a UL, OL, etc., inside a list item (LI).

Link elements

It is normal for HTML documents to contain links to other documents, which can be located anywhere on the WWW. These links are provided by Universal Resource Locators (URLs), which are identifiers that name the location and filename of a document, and the protocol used to access it.

The following elements represent links to other documents:

HoTMetaL has three commands for working with URLs:

Links within the same document

This topic is covered in an extended example in the tutorial section.

In general, you can set up a "source" and "destination" anchor pair by setting the NAME attribute of the destination anchor to `string' and setting the URL of the source anchor to `#string'. This sets up a one-way link. You can set up a two-way link by editing the two anchors so that each one's NAME attribute corresponds to the other's URL.

`Hot images'

A `hot image' is used like an anchor --when you click on the image, the browser retrieves a document.

This is very easy to accomplish: you just need to insert an IMG element inside an A element. Each element will have a URL: the IMG's URL locates the image, and the A's URL locates the file that is retrieved when you click on the image.

Images with hot spots

Sometimes you will see images that have several "hot spots" that you can click on and cause different documents to be retrieved. This is accomplished by means of a clickable image map, a file that tells the browser where the hot spots are. To prepare such a file, you'll need other tools besides HoTMetaL, and so we won't discuss the procedure here. Rather, you should retrieve the document "Overview on using Clickable Image Maps " by opening the file faq.htm, located in the HoTMetaL installation directory, with a browser and clicking on the appropriate anchor.

Forms

The following elements are used to construct forms that the user can fill in and submit (e.g., via e-mail). When your document is browsed, the browser will generate the appropriate graphical widgets.

For more information on forms, see SoftQuad's tutorial on forms. You can also retrieve the document "Information on setting up form functionality" by opening the file faq.htm, located in the HoTMetaL installation directory, with a browser and clicking on the appropriate anchor. To see an example of a form, use Open Template... to open the template custreg.htm.

Other elements

The elements in this section do not fit into the categories described above.

Obsolete elements

The elements PLAINTEXT, XMP, and LISTING are obsolete and are supported in this release of HoTMetaL only for compatibility with older documents. Using these elements in new content is not recommended. XMP and LISTING should be replaced by PRE.

The obsolete elements COMMENT and HP are not supported.

Proposed elements

The proposed elements DFN, STRIKE, and U are not supported by HoTMetaL.

If you see something you like...

If you see a web page that contains a typographical effect, form, etc., that you like, then the easiest way of achieving the same thing yourself is to save the file with the browser (make sure you save it in HTML format) and then open it with HoTMetaL.

For further information...

The file faq.htm in the HoTMetaL installation directory contains titles and URLs for documents that contain information on HTML usage. Open this file with a browser and retrieve the documents that you're interested in.

A number of HTML tutorials, of varying quality, are usually available on the web. The relevant Usenet newsgroups (those in the comp.infosystems.www hierarchy) are also a source of information.