Language References
Denotes one item in a list. | HTML 2, 3.2, 4, 4.01, 5 |
HTML Syntax
<li
class = classname
id = value
style = css properties
title = text
type = 1 | a | a | i | i | disc | circle | square
value = value
event = script
>
The LI element indicates a list item, which is usually preceded by a bullet, a number, or a letter. The LI element is used only inside list elements such as DIR ( directory ), MENU ( menu list ), OL ( ordered list ) and UL ( unordered list ).
Each LI element can contain other elements such as the P element.
The TYPE attribute values disc, circle, and square apply to unordered lists. Whereas the TYPE values 1, a, A, i, and I apply to ordered lists.
The LI element does not require a closing tag.
LI Members
The following shows how the LI element may be used.
<p>The LI element allows an author to:</p>
<ul>
<li>Identify items in a numbered list
<li>Identify items in an unordered list
<li>Identify items in a directory list
<li>Identify items in a menu
</ul>
which would render on a Web page as
The LI element allows an author to:
- Identify items in a numbered list
- Identify items in an unordered list
- Identify items in a directory list
- Identify items in a menu
DIR MENU OL UL Using Lists in HTML