Can I place the navigation menu inside the site header?

1

Could I put the navigation menu inside the site header? Usually, it comes after the header (from what I saw). If I put it in, is it wrong? I made a website, after I saw that the nav was inside the header.

    
asked by anonymous 25.04.2018 / 12:40

1 answer

2

To answer your question in a more assertive and less judgmental way, I've taken the W3C reference on the nav tag: link

Free translation:

  

The nav element represents a section of a page that links to   other pages or other parts of the page: a section with links to   navigation.

That is, you should have the navigation itself, which can be at the top, side, etc.

And if you still have questions, see the same link above Example 10 , copied the relevant part here:

<header>
    <h1>Wake up sheeple!</h1>
    <p><a href="news.html">News</a> -
      <a href="blog.html">Blog</a> -
      <a href="forums.html">Forums</a></p>
    <p>Last Modified: <span property="schema:dateModified">2009-04-01</span></p>
    <nav>
      <h2>Navigation</h2>
      <ul>
        <li><a href="articles.html">Index of all articles</a></li>
        <li><a href="today.html">Things sheeple need to wake up for today</a></li>
        <li><a href="successes.html">Sheeple we have managed to wake</a></li>
      </ul>
    </nav>
</header>

That is, navigation inside the header, nothing wrong here, semantic tags header and nav work well together, show exactly what each part of html does.

    
25.04.2018 / 13:56