DEV 5.3 Define list and list items properly

Examples

A simple nested list

<p>Items needed for holiday:</p>
  <ol>

    <li>Sunglasses</li>
    <li>Swimming things
      <ul>
        
<li>Swimsuit</li>
        
<li>Towel</li>

      </ul>
    </li> <!-- note the placement -->
    <li>Suncream</li>
    <li>Money</li>
  </ol>

Ideally all menus should be coded as lists. For example main nav bar, local navigation, footer links

Note: Even horizontal menus can be coded as lists using CSS, e.g.

  • Use display:inline; on the .ul and .li definition or;
  • Use list-style-type: none; on the .ul definition, display: block; float: left; on the .li definition.