Forms of list in HTML

These lists may be nested

Glossaries

A glossary (or definition list) is a list of paragraphs each of which has a short title alongside it. Apart from glossaries, this element is useful for presenting a set of named elements to the reader. The elements within a glossary follow are introduced by these elements:

DT
The "term", typically placed in a wide left indent
DD
The "definition", which may wrap onto many lines

These elements must appear in pairs. Single occurrences of DT without a following DD are allowed, and have the same significance as if the DD had been present with no text.. The one attribute which DL can take is

COMPACT
suggests that a compact rendering be used, because the enclosed elements are individually small, or the whole glossary is rather large, or both.

Typical rendering

The definition list DT, DD pairs are arranged vertically. For each pair, the DT element is on the left, in a column of about a third of the display area, and the DD element is in the right hand two thirds of the display area. The DT term is normally small enough to fit on one line within the left-hand column. If it is longer, it will either extend across the page, in which case the DD section is moved down to separate them, or it is wrapped onto successive lines of the left hand column.

This is sometimes implemented with the use of a large negative first line indent.

White space is typically left between successive DT,DD pairs unless the COMPACT attribute is given. The COMPACT attribute is appropriate for lists which are long and/or have DT,DD pairs which each take only a line or two. It is of course possible for the rendering software to discover these cases itself and make its own decisions, and this is to be encouraged.

The COMPACT attribute may also reduce the width of the left-hand (DT) column.

Examples of use

	<DL>
	<DT>Term the first<DD>definition paragraph is reasonably
	long but is still displayed clearly
	<DT>Term2 follows<DD>Definition of term2
	</DL>

	<DL COMPACT>
	<DT>Term<DD>definition paragraph
	<DT>Term2<DD>Definition of term2
	</DL>




Lists

A list is a sequence of paragraphs, each of which may be preceded by a special mark or sequence number. The syntax is:

		<UL>
		<LI> list element
		<LI> another list element ...
		</UL>

The opening list tag may be any of UL, OL, MENU or DIR. It must be immediately followed by the first list element.

Typical rendering

The representation of the list is not defined here, but a bulleted list for unordered lists, and a sequence of numbered paragraphs for an ordered list would be quite appropriate. Other possibilities for interactive display include embedded scrollable browse panels.

List elements with typical rendering are:

UL
A list of multi-line paragraphs, typically separated by some white space and/or marked by bullets, etc.
OL
As UL, but the paragraphs are typically numbered in some way to indicate the order as significant.
MENU
A list of smaller paragraphs. Typically one line per item, with a style more compact than UL.
DIR
A list of short elements, typically less than 20 characters. These may be arranged in columns across the page, typically 24 character in width. If the rendering software is able to optimize the column width as function of the widths of individual elements, so much the better.

Example of use

		<OL>
		<LI> When you get to the station, leave
		by the southern exit, on platform one.
		<LI>Turn left to face toward the mountain
		<LI>Walk for a mile or so until you reach the
		"Asquith Arms" then 
		<LI>Wait and see...
		</OL>

		< MENU >
		<LI>The oranges should be pressed fresh
		<LI>The nuts may come from a packet
		<LI>The gin must be good quality
		</MENU>

		< DIR >
		<LI>A-H<LI>I-M
		<LI>M-R<LI>S-Z
		</DIR>