I’m trying to implement correct sectioning with html5 sectioning elements and headlines while achieving the design/layout, my customer has requested (including certain restrictions).
The general layout will be something like this:
<body>
<header>
<nav class="breadcrumbs"><ol /></nav>
<h1>page title</h1>
<p>visual title</p>
<p>sponsor</p>
<nav class="main_navigation"><ul /></nav>
</header>
<div class="main_content">
<article><h2>Article title</h2></article>
<article><h2>Article title</h2></article>
<article><h2>Article title</h2></article>
<article><h2>Article title</h2></article>
</div>
<footer>Footer stuff<footer>
</body>
What I’m concerned with now is that if I use an html5 outliner, I get the breadcrumb nav and the main nav show up as untitled sections.
Following a hierarchical headline structure, I can’t give them headlines below h2 and naturally I wouldn’t “title” them at all and hiding a headline with css to “title” them feels wrong.
What’s the best way to stay semantically correct, confirm to seo standards and prevent those to appear as untitled sections?
Apparently,
navelements are untitled because they are sectioning elements.If you must have them as titled sections in your outline, you will need to add a heading inside them.
In this instance, you could do the following…
Then hide the
h2s with css.BTW, you should probably change
divtosectionto be more semantic… here