From http://www.w3schools.com (Copyright Refsnes Data)
ExampleOne ordered and one unordered HTML list:
Try it yourself! (more examples at the bottom of this page) |
The <li> tag defines a list item.
The <li> tag is used in both ordered (<ol>) and unordered (<ul>) lists.
The <li> tag is supported in all major browsers.
The "type" and "value" attributes of the li element were deprecated in HTML 4.01, and are not supported in XHTML 1.0 Strict DTD.
Tip: Use CSS to define the type of list and list item.
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute | Value | Description | DTD |
---|---|---|---|
type | 1 A a I i disc square circle |
Deprecated. Use styles instead. Specifies which kind of bullet point will be used |
TF |
value | number | Deprecated. Use styles instead. Specifies the number of a list item |
TF |
id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard Attributes.
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
A nested list
A nested list.
Another nested list
A more complicated nested list.
From http://www.w3schools.com (Copyright Refsnes Data)