1.6. Structure navigation menus with lists

Use unordered list elements <ul> and <li> to mark up navigation menus.

For primary menus, be sure to nest the links appropriately:

<nav role="navigation" aria-label="Main menu">
 <ul>
  <li><a href="…">First menu item</a></li>
  <li>
    <a href="…">Second menu item</a>
    <ul>
      <li><a href="…">First sub-menu item</a></li>
      <li><a href="…">Second sub-menu item</a></li>
    </ul>
  </li>
  <li><a href="…">Third menu item</a></li>
 </ul>
</nav>

Find out more

Comments

Add a comment

Required fields are marked *.

Back to top