HTML » Tags » ul

Version: 2.0, 3.2, 4.0

Compability: Explorer 4, 5  Netscape 4, 6

Syntax:
<ul> ... </ul>

The <ul> tag is used to delimit the start and stop of an unordered list. An unordered list is a collection of items (typically related somehow) that are in no particular order. Each item in the list is preceded by a bullet with the default being a round disc: •

Most browsers separate the list from any preceding and following text by paragraph breaks. You can nest unordered lists and each nested list can have a different bullet.
 
You must use the li tag to display an item in the list.
 
You can use the ol tag to create an ordered list and the dl tag to create a definition list. (The dir and menu list tags are deprecated.)
 
The closing tag is mandatory.
 

Examples

Code:
<ul>
<li> Definition List
<ul type="square">
<li> dd tag
<li> dl tag
<li> dt tag
</ul>
<li> Ordered List
<ul type="circle">
<li> ol tag
<li> li tag
</ul>
<li> Unordered List
<ul type="disc">
<li> ul tag
<li> li tag
</ul>
</ul>
Output:
  • Definition List
    • dd tag
    • dl tag
    • dt tag
  • Ordered List
    • ol tag
    • li tag
  • Unordered List
    • ul tag
    • li tag
Explanation:

The preceding example shows the use of the <ul> tag to produce an unordered list. For examples of ordered and definition lists please see the respective pages.

Language(s): HTML

See Also: