A list item is one entry in an ordered or unordered list. In HTML, the <li> element holds the item text, while an <ol> or <ul> element provides the surrounding list. section 3.10 section 3.8
Choose the surrounding list element according to how the items should behave:
- Use <ol> when position or sequence matters; the browser supplies and updates the numbers automatically. section 3.8
- Use <ul> when items belong together but do not need numeric order; the browser supplies bullets automatically. section 3.9
- Write each item between an opening <li> tag and a recommended closing </li> tag. section 3.8 section 3.9
A numbered list
<ol> <li>Choose ingredients</li> <li>Mix everything</li> <li>Serve</li> </ol> The browser displays these entries as numbered items and adjusts the numbers if an item is inserted or removed. section 3.8
<h3>Top 10 Modern Words of Unknown Origin</h3>
<ol> #1
<li><em>jazz</em> (1909)</li> #2
<li><em>jive</em> (1928)</li> #2
<li><em>bozo</em> (1920)</li> #2
<li><em>dork</em> (1964)</li> #2
<li><em>pizzazz</em> (1937)</li> #2
<li><em>humongous</em> (1970)</li> #2
<li><em>gismo</em> (1943)</li> #2
<li><em>zit</em> (1966)</li> #2
<li><em>reggae</em> (1968)</li> #2
<li><em>mosh</em> (1987)</li> #2
</ol> #1
See a complete <ul> containing several <li> elements, with the list container and individual entries marked separately. section 3.9


