HTML and CSS Reference
In-Depth Information
An unordered list, the traditional bulleted list of PowerPoint legend, is
made up of a
<ul>
element and a collection of
<li>
child list items, and
an ordered list is made up of a
<ol>
element and a collection of child
<li>
items. The list items can themselves include more list elements
with their own list items, resulting in a nested list.
<ul>
<li>List item</li>
<li>List item
<ul>
<li>Nested item</li>
<li>Nested item</li>
</ul>
</li>
<li>List item</li>
</ul>
<ol>
<li>List item</li>
<li>List item
<ol>
<li>Nested item</li>
<li>Nested item</li>
</ol>
</li>
<li>List item</li>
</ol>
It's perfectly acceptable to nest ordered lists within unordered lists and
unordered lists within ordered lists.
<ul>
<li>List item</li>
<li>List item
<ol>
<li>Nested item</li>
<li>Nested item</li>
</ol>
</li>
<li>List item</li>
</ul>
<ol>
<li>List item</li>
<li>List item
<ul>
<li>Nested item</li>
<li>Nested item</li>
</ul>
</li>
<li>List item</li>
</ol>