Right or wrong in this case does not exist. recommended by HTML5
specifications.
No HTML4
because all semantic sections with the <div>
tag are part of the document structure, there are no ways to have sections that contain information related not to the document itself, but to the site as a whole, as logos, menus, tables of contents, copyright or legal notices. For this purpose, HTML5
introduces three new elements:
-
<nav>
for link collections (such as a table of contents)
-
<footer>
and <header>
for site-related information.
Note that <footer>
and <header>
are not section contents like <section>
, instead, they exist to semantically delimit parts of a section.
Returning now to your universe, the nav tag is commonly used to create menus as it represents a set of links. So yes you do well in using it in your menu. Home
As for placing it inside the header tag, it is entirely up to you, as the menu represents in a way the structure of your site, and falls within the recommended content for this tag " information related to the site ".
Finally, using section or div might be a good practice if the div
in question represents a section of your site. Example:
<div class="corpo-da-pagina">
<!-- Todo o conteúdo da sua página -->
</div>
In the above case it would be recommended according to the specifications of HTML5
to use a section
tag.