HTML5 Beginner Layout · 1 min read

Semantic navigation bar

Start the HTML5 learning path »

❮ HTML5 Home All Tutorials ❯

How do I mark up a site nav?

nav + list of links.

Example

Interactive preview available
HTML5 Example
<header>
  <nav aria-label="Primary">
    <ul>
      <li><a href="/">Home</a></li>
      <li><a href="/courses">Courses</a></li>
      <li><a href="/contact">Contact</a></li>
    </ul>
  </nav>
</header>

Line-by-Line Walkthrough

Lists inside nav help assistive tech announce structure.

Need more coins?

You do not have enough coins for this action.

Your balance: 0 coins

Share

Reactions

Loading reactions…