[html5] Understanding <nav> and <h1>

Nathan Ziarek nziarek at gmail.com
Wed Jan 20 07:29:05 PST 2010


I'm in the process of reformatting our navigation and thought I'd
include the <nav> element as a small start to implementing HTML5.

Currently the HTML looks like this:

<h2>Menu Title</h2>
<ul><li><a>Menu Link</a></li>...</ul>
etc.

I've always disliked this set up as I believe that the heading
elements should be used exclusively for the content of the page, not
the chrome / utilities. My goal was to remove the <h2>'s altogether
and simply wrap the entire menu in <nav> as a short-term clean up.

Looking at the spec, I noticed that it uses <h1> within the nav as the
menu headings (http://www.whatwg.org/specs/web-apps/current-work/#the-nav-element).
Since HTML5 allows for breaking up the page into more logical areas,
this makes sense to me, as the menu heading is the "top-level" item
within the <nav> element.

My question, given the maturity of the spec, and with full
consideration for SEO, is this the smart choice?

Without the <nav> element, I believe multiple <h2>s in the navigation
hurt the semantic organization of the document (and hence SEO). With
the <nav> element, however, I think we actually come out ahead, but
I'm not sure of the state of crawlers and HTML5 (nor am I sure there
is definitive proof one way or the other).


Appreciate your thoughts,

Nathan



More information about the Help mailing list