XHTML Reference


go to previous section go to next section 

Lists

Lists are used to display related items. There are three types of lists supported by XHTML.

 

Unordered Lists

An unordered list is one where there is no significance to the order in which the list entries appear. Unordered lists have a 'bullet' in front of each list entry. The general format of source code for an unordered list is:

<ul> (<li> </li>) </ul>

where () indicates a repeating group. For example.

<ul>
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ul>

will display as

The following optional attributes can be specified on unordered list tags:

The following attributes are deprecated but can still be used with the transitional DOCTYPE on the <ul> tag

The following attributes are deprecated but can still be used with the transitional DOCTYPE on the <li> tag

go to top

 

Ordered Lists

An ordered list is one where there is significance to the order in which the list entries appear. Ordered lists are numbered (or lettered) to indicate the place within the order of each item. The general format of source code for an ordered list is:

<ol> (<li> </li>) </ol>

where () indicates a repeating group. For example.

<ol>
<li>Item one</li>
<li>Item two</li>
<li>Item three</li>
</ol>

will display as

  1. Item one
  2. Item two
  3. Item three

The following optional attributes can be specified on ordered list tags:

The following attributes are deprecated but can still be used with the transitional DOCTYPE on the <ol> tag

The following attributes are deprecated but can still be used with the transitional DOCTYPE on the <li> tag

go to top

 

Definition Lists

A definition list is one where there are two parts to each entry within the list. The first of these is the term and the second is the definition. The general format of source code for a definition list is:

<dl> (<dt> </dt> <dd> </dd>) </dl>

where () indicates a repeating group. For example.

<dl>
<dt>Term one</dt>
<dd>definition of term one</dd>
<dt>Term two</dt>
<dd>definition of term two</dd>
<dt>Term three</dt>
<dd>definition of term three</dd>
</dl>

will display as

Term one
definition of term one
Term two
definition of term two
Term three
definition of term three

The following optional attributes can be specified on definition list tags:

The following attributes are deprecated but can still be used with the transitional DOCTYPE on the <dl> tag

go to previous section go to next section 

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate