lists | ![]() |
![]() |
![]() |
While tables allow structurization of material in a visual way, lists can be used when the material contains some linear kind of order. HTML 3.2 supports two categories of lists.
simple lists | ![]() |
![]() |
![]() |
Ordered lists (<OL>) should be used when the list has a specific sequence. Customizing can be done by adding the TYPE attribute, which provides alternative styles of numbering by setting its content to a, A, i, I, or 1. The entire list numbering can be offset by setting the number of the first item in the start attribute. However, if the material should be itemized, but doesn't have a strict order, the unordered list (<UL>) can be used. For this tag the TYPE attribute can be set to DISC, CIRCLE or SQUARE, reflecting the kind of bullet that is to be used.
The separate items in a list, ordered or not, are marked with the <LI> tag, which can also take a TYPE attribute, the value of which depends on the type of list. The ordered list items can optionally be provided with a VALUE attribute, taking the preferred ordinal number of the item.To give an example of the use of these lists, the source below
<UL TYPE=SQUARE> <LI> a list item <LI> another list item </UL> <OL TYPE=I> <LI VALUE=3> first item <LI TYPE=i VALUE=2> second item </OL>
displays like
Note that the ordered list does not reorder the items for which the ordinal number is changed. The VALUE attribute is just markup.
It is allowed to nest lists to achieve sub-ordering.
Since lists are typically indented, you can use a list without items to indent entire paragraphs.
terms | ![]() |
![]() |
![]() |
The other category of lists in HTML 3.2 allows the creation of indexes, or lists of definitions, and is invoked with the <DL> (definition list) tag. Items are added using the <DT> (definition term) and <DD> (definition description) tags, for example
<DL> <DT> a term <DD> the description <DT> another term <DD> the description </DT>
which displays like
These three tags take no attributes, and special effects should be implemented by adding markup to the terms and descriptions. As another example, the lists of attributes that show up every now and then on these pages are definition lists.
I will not guarantee that any of these pages will exist indefinately, so please only bookmark the top page. |