li – list item
Summary
The li element represents one list item.
Overview Table
Its parent element may be ol, ul, or menu.
HTML Attributes
value
= valid integer
Specifies the ordinal value of the list item.
The value attribute can be used when the parent element in only a ol element. [Example B]
Examples
This example uses the li element to create individual items in an unordered list.
<ul>
<li>Art</li>
<li>History</li>
<li>Literature</li>
<li>Sports</li>
<li>Entertainment</li>
<li>Science</li>
</ul>
This example uses the li element to create individual items in an ordered list.
<ol>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ol>
Typical browser default CSS properties for the li element.
display: list-item;
margin-left: 40px;
Notes
Remarks
The type attribute values disc, circle, and square apply to unordered lists; the values 1, a, A, i, and I apply to ordered lists. When the li element is absolutely positioned with CSS, the list item marker is not rendered. The default value of the display property for this element is list-item.
Related specifications
See also
Other articles
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]