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">
  <li><a href="…">First menu item</a></li>
    <a href="…">Second menu item</a>
      <li><a href="…">First sub-menu item</a></li>
      <li><a href="…">Second sub-menu item</a></li>
  <li><a href="…">Third menu item</a></li>

Find out more


Add a comment

Required fields are marked *.

Back to top