Is it bad to put a header element directly inside a nav ?
Say I want an horizontal bar with “Site::Page” on the left and the list of links to the articles in my page on the right, is it fine to make it this way :
<nav>
<header>Fruitland::Three common bananas</header>
<ul><li>Link to kind 1</li><li>Link to kind 2</li><li>Link to kind 3</li></ul>
</nav>
or should I rather wrap only the ul in a nav, use a h4 for my left part and a div to bind the whole thing together ?
No, it is not “bad” but it might be considered best practice to use
<h1>here instead. Referring to the first example that W3C documents for the<nav>element, they use a<h1>within a<nav>to describe their navigation menu.W3C seems to like using
<header>in other places, such as within the<body>or an<article>element.