li
Description
Use the li element to specify each list item in both ordered and unordered lists. It cannot be used on its own or in an element besides an ol or ul (or menu in HTML5). An li may contain both block-level and inline content, including div, span, a, p, all other list types, and more.
Examples:
<h4>Sequence of Events before Heading out Tonight</h4> <ol> <li>Stretch</li> <li>Run five miles</li> <li>Shower and dress for dinner</li> </ol> <h4>Items to Buy for First Grade</h4> <ul> <li>Notebooks</li> <li>Pencils</li> <li>Eraser</li> </ul>
Please see the ol and ul entries in this chapter for more information about li for each list type.
Deprecated Attributes
The following attributes are deprecated in X/HTML:
- type: Obsolete in HTML5. This attribute is presentational in nature so was deprecated in favor of using CSS. Please see the ol entry in this chapter for more.
- value: There is no equivalent replacement in X/HTML. Please see the "HTML5 and the li Element" box for more information regarding HTML5.