W3C home > Mailing lists > Public > public-html@w3.org > January 2008

3.8.3. The nav element

From: Ben Boyle <benjamins.boyle@gmail.com>
Date: Sat, 19 Jan 2008 21:17:06 +1000
Message-ID: <5f37426b0801190317t150c03bp6e027cabe2b69e91@mail.gmail.com>
To: HTMLWG <public-html@w3.org>


I like this concept, I can see it as very useful to mark sections of
the page as being "mostly navigation" (i.e. not content). I say
"mostly" as I imagine these sections could include a bit of prose in
the mix... if it were going to be restricted to links only then the
XHTML2 nl (navigation list) element would have been more appropriate.
While not as explicit as nl, I think I will find nav more useful when
authoring. Flexibility is good.

Except, I can see the content model skewing the situation. I may be
reading the spec wrong, but it says nav belongs to the category of
"sectioning content". Doesn't this mean that using <nav> ... </nav>
implies a new subsection, with it's own potential header, footer and
address components? I think nav would be more appropriate as a
component of a section (the same as header, footer and address, which
are not in the "sectioning content" category). Furthermore, I think
some nav belongs within the header/footer context, and this is
explicitly disallowed in the current spec (those elements may not
contain "sectioning content").

Some examples supporting this perhaps?

1. www.apple.com
Look at div#homefooter. I will make the leap this could be <footer> in
HTML5. Now look at its contents ... wouldn't <nav> be appropriate for
p.links.right? (Possibly for p.links.left, but maybe address would be
good there too).

2. http://www.microsoft.com/windows/products/winfamily/ie/default.mspx
Consider table#msviFooter ... wouldn't a footer > nav context make sense again?

3. http://www.opera.com/
Let's mix it up a bit ... div#top and div#menu are a good example of a
header with a sibling (not nested) nav element. This would be ok in
HTML5 (except that it is implied in the spec that the nav would be its
own section rather than a component of the first ancestor sectioning
content: the body element in this example). Still, there second p
within div#footer again looks like nav nested inside footer (in HTML5
parlance) to me.

4. http://www.mozilla.org/
Whoah, wait up a minute. div#header contains a ul with navigation...
that would be header with a nested nav, right?

5. http://www.w3.org/
W3C have no wrappers for their "header", just h1-2 tags. Fine in all
HTML languages afaik. There's a div.banner that could be nav. Whether
or not there should be a "footer section" (or it could be implied by
the content) will be a question that plagues many authors I am sure
... and whether or not legal links are "nav sections" ...

Now I know I've picked very specific examples, but you could go to any
site and they will all be along these lines... some with explicit
header/footer markup and with nav sometimes within, sometimes adjacent
to, those sections.

Hope you've enjoyed this quick look at the relationship between
header, footer and nav. I'm keen to hear more opinions. Am I on track
in thinking that nesting nav inside header/footer will be useful? Have
I missed the point somewhere? Discuss.

You may also find some value in the last section of this ALA article.
It contains some good thoughts on footers and is part of the
inspiration behind my looking closer at how footer/nav work in HTML5:

Received on Saturday, 19 January 2008 11:17:28 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:25 UTC