Name

li — <li> . . . </li>

Defines an item in a list. It is used within the ol, ul, menu (deprecated ), and dir (deprecated ) list elements.

Attributes

Core, Internationalization, Events

type="format"

Deprecated. Changes the format of the automatically generated numbers or bullets for list items.

Within unordered lists (ul ), the type attribute can be used to specify the bullet style (disc, circle, or square ) for a particular list item.

Within ordered lists (ol ), the type attribute specifies the numbering style (see options under the ol listing) for a particular list item.

start="number"

Nonstandard. Within ordered lists, you can specify the first number in the number sequence. In the (X)HTML Recommendations, the start attribute applies to the ol element, not li.

value="number"

Deprecated. Within ordered lists, you can specify the number of an item. Following list items increase from the specified number.

Example

<ol>
  <li>Preheat oven to 300.</li>
  <li>Wrap garlic in foil.</li>
  <li>Bake for 2 hours.</li>
</ol>

Get HTML and XHTML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.