This is a bullet pointed list. The list opens with the <ul> tag and closes with a </ul> tag. A <li> tag is used to specify the bullet pointed text.
<ul> <li>England</li> <li>New Zealand</li> <li>Australia</li> </ul>
will display as follows:
Items can be indented by nesting one list within another. The type of bullet point can also be changed. Attributes for all list types were deprecated in HTML 4.01 and so style sheets should now be used to achieve the desired effects.
<ul> <li>England <ul> <li>NEC Harlequins</li> <li>London Wasps</li> <li>London Irish</li> </ul> </li> <li>New Zealand <ul> <li>Auckland Blues</li> <li>Canterbury Crusaders</li> <li>Otago Highlanders</li> </ul> </li> <li style="list-style-type:circle">Australia <ul style="list-style-type:square"> <li>NSW Waratahs</li> <li>ACT Brumbies</li> <li>Queensland Reds</li> </ul> </li> </ul>
results in:
The England and New Zealand lists have the default bullet point types, but note that Australia has a hollow circle and that the team list has square bullet points.
A single item or a complete list can have its bullet point type changed by using the CSS2 list-style-type property.
Specifying "list-style-type: none" will remove the bullet points.
An ordered list works in much the same way as an unordered one, only instead of bullet points, numbers and letters are used. The <ol> tag is used for ordered lists.
<ol> <li>England</li> <li>New Zealand</li> <li>Australia</li> <li>South Africa</li> </ol>
will display as follows:
As with unordered lists, lists may be nested and the numbering system may changed to a variety of choices by using the CSS list-style-type property as demonstrated in the following example.
<ol> <li>England <ol style="list-style-type: upper-roman"> <li>NEC Harlequins</li> <li>London Wasps</li> </ol> </li> <li>New Zealand <ol style="list-style-type: lower-roman"> <li>Auckland Blues</li> <li>Canterbury Crusaders</li> </ol> </li> <li>Australia <ol style="list-style-type: upper-alpha"> <li>NSW Waratahs</li> <li>ACT Brumbies</li> </ol> </li> <li>South Africa <ol style="list-style-type: lower-alpha"> <li>Natal Sharks <li>Blue Bulls</li> </ol> </li> </ol>
will display as:
These are lists without bullet points or numbers but with indentation.
They are intended for lists of terms and their definitions.
Three different tags are used, <dl>, <dt> and <dd>.
<b>VAGen Return Codes</b> <dl> <dt>EOF</dt> <dd> End of File</dd> <dt>FMT</dt> <dd> File format error</dd> <dt>FNF</dt> <dd> File not found</dd> <dt>NRF</dt> <dd>No record found</dd> </dl>
displays as:
In the past these tags have been used to produce indentation. This is most definitely not recommended! The CSS margin, padding and text-indent properties may be, and should be, used to achieve this sort of indentation a lot more effectively.
Top