HTML <li> tag

Usage

Defines a list item in an unordered list (ul) or ordered list (ol). Each list item should be contained within an opening and closing list item tag. When nesting lists, the entire nested list should be situated within a parent list item (see example).

Example

Code:

Normal list:

<ul>
<li>Eggs</li>
<li>Bacon</li>
<li>Milk</li>
</ul>

Nested list:

<ul>
<li>List item one</li>
<li>List item two
	<ul>
	<li>Nested list item one</li>
	<li>Nested list item two</li>
	</ul>
</li>
<li>List item three</li>
</ul>

Output:

Normal list:
  • Eggs
  • Bacon
  • Milk
Nested list:
  • List item one
  • List item two
    • Nested list item one
    • Nested list item two
  • List item three

Required Attributes

  • none

Optional Attributes

  • none

Core Attributes