[whatwg] Small consistency issue with HTML5 nav element examples
ian at hixie.ch
Fri Jan 14 16:17:40 PST 2011
On Fri, 14 Jan 2011, Nicholas Zakas wrote:
> Ah, I misinterpreted. With this in mind, I'm a bit unclear as to when
> <nav> should be used. If it's intended for primary navigation but
> secondary navigation can also be marked up with it, does that mean it's
> best to use <nav> whenever you have more than one link grouped together?
The nav element represents a section of a page that links to other pages
or to parts within the page: a section with navigation links. That's all.
In practice there are literally millions of variations on how a page is
constructed, so there is a practical limit to how detailed we can be. This
is not a new problem; for example, is a paragraph that lists the kinds of
fruit that are in a fruit bowl a <ul> list, or is <p> sufficient?
Basically, at the end of the day, some level of authoring judgement has to
be applied. If you think a part of your page is "a section with navigation
links", then you can use <nav> (but you aren't required to).
For authors who have been writing HTML pages for a while, another way of
putting it is "use <nav> whenever you would have used <div class="nav">
before". So long as you used class="nav" for navigation, anyway. :-)
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg