li

FilterElements

<li> ... </li>

Defines an item in a list. It is used within the ol, ul, menu, and dir list elements. (Note that menu and dir are deprecated in HTML 4.01. In HTML5, menu has been redefined and dir has been removed.)

Start/End Tags

HTML: Required/Optional;
XHTML: Required/Required

Specifications

  • HTML 4.01
  • HTML5

type=

Values: format
Deprecated. Not in HTML5. 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 for a particular list item (see options under the ol listing).

value=

Values: number
Deprecated in HTML 4.01. Included in HTML5. Within ordered lists, specifies an item’s number. Following list items increase from the specified number.
<ol>
  <li>Preheat oven to 300.</li>
  <li>Wrap garlic in foil.</li>
  <li>Bake for 2 hours.</li>
</ol>

Rendered Example

      
  1. Preheat oven to 300.
  2.   
  3. Wrap garlic in foil.
  4.   
  5. Bake for 2 hours.

The character preceding a list item is dependent on the type and formatting of its containing list.