Learning HTML 3.2 by Examples, section 4 Fundamental structures in HTML 3.2, with examples:

Organizing the contents - headings, paragraphs, lists, etc

Generally, you divide your document into parts, which may in turn be divided into parts etc. In HTML, such division is expressed using headings of different level. The lowest-level parts in this hierarchy consist of one or more paragraphs. In addition to normal paragraphs and some special kinds of paragraphs like (long) quotations, HTML 3.2 supports lists and tables, which can be regarded as paragraph-like. The internal structure of paragraphs and paragraph-like elements is expressed using text level tags, to be discussed later.

The tags for expressing major structural features, so-called block level tags, are the following:

A recommendable approach, which may need adjustments to fit your local recommendations, is the following:

  1. Write a descriptive heading for the entire document and use H1 element with ALIGN=CENTER attribute for it.
  2. Divide the document into major parts (sections), write suitable titles for them, using H1 with ALIGN=LEFT. In this and further divisions, try to avoid having more than seven parts.
  3. If necessary, divide each major part into smaller parts with H2 headings, and if needed divide each of these subsections into subsubsections with H3 headings. Avoid using H4 headings and especially H5 and H6 headings, both because they are often rendered with a very small font and because more than three levels of structure tends to make the document hard to read. (If you still feel tempted to use H4, consider dividing the entire document into smaller documents.)
  4. If you have a section with, say, H2 heading and containing H3 headings, avoid inserting text between the H2 heading and the first H3 heading. Such "homeless" text can be acceptable if it only contains very short notes such as general orientation, some remarks about the section, or a motto. Long homeless texts confuse the reader who does not see your good intentions; therefore, use a subsection with a heading of the appropriate level and with text like Introductory remarks, Generalities or Summary.
  5. Divide the smallest parts of the above-mentioned structure into paragraphs or paragraph-like blocks (namely lists or tables). as described below. Notice that in HTML you must explicitly indicate paragraph division by HTML elements; leaving just an empty line does not cause a paragraph break.
  6. Within paragraphs, use text level markup, normally phrase markup, to distinguish special text segments from normal text, e.g. to indicate quotations of computer output or to emphasize key words.
  7. Add links and, if applicable, images or other illustrations.
As regards to the paragraph level, there are quite a few alternatives. The following list is intended to give some practical guidelines for selecting a suitable alternative:

List can be nested in the sense that an item in a list, i.e. an LI (or DD) element, may in turn contain a list element.

Notice that the basic paragraph element P is not nestable, i.e. you cannot have P elements within a P element to create subparagraphs. However, the various list elements effectively provide an itemization structure which essentially corresponds to subparagraph division. Moreover, the list elements are nestable.


Date of last update: 2010-12-16.
This page belongs to the free information site IT and communication, section Web authoring and surfing, by Jukka "Yucca" Korpela.