W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2011

[whatwg] Small consistency issue with HTML5 nav element examples

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 15 Jan 2011 00:17:40 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1101150008340.28618@ps20323.dreamhostps.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 14 January 2011 16:17:40 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:29 UTC