Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > HTML/XHTML

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book



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.


<h4>Sequence of Events before Heading out Tonight</h4>
        <li>Run five miles</li>
        <li>Shower and dress for dinner</li>

<h4>Items to Buy for First Grade</h4>

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.
  • + Share This
  • 🔖 Save To Your Account