[html5] <nav> for external links?

Jukka K. Korpela jukka.k.korpela at kolumbus.fi
Thu Apr 28 22:56:38 PDT 2011


Bjartur Thorlacius wrote:

> How is one to decide when to use
> <div><nav><ol><a></a>..</ol></nav></div> rather than
> <head><link>..</head>?

The former is for navigational tools in the document, typically for visible 
links that the user can click on. The latter declares relationships to other 
documents, without implying that they should be useable in any particular 
way.

The idea of using elements like <link rel="next" href="..."> to specify 
relationships that browsers would implement as part of their own 
navigational menus was interesting. It was implemented in some versions of 
Firefox, though few users ever noticed it, and it still has some support in 
Opera. But it has become a pointless idea, due to lack of browser vendors' 
enthusiasm to support it prominently and due to lack of a useful set of 
standardized rel attribute values (in HTML5, the set has actually been 
reduced rather than improved and extended - there aren't even values for 
such extremely common relations like "parent page" and "top page", and 
generally the rel value mess is the same as in the 1990s, if not worse).

It would probably be better to specify that rel values such as "next" are 
_not_ allowed in <link> elements. This would help authors in avoiding 
illusions, like setting up assumed relations that are ignored by most user 
agents

> Also, putting <nav> inside <body> seems confusing to me, as it's
> clearly never to be part of the body.

By definition, the <body> element is the entire document to be presented to 
the user, including any navigation, top banner, footer, and aside stuff. 
It's all there is, except that the <head> element contains _metadata_ that 
may affect _how_ the body is presented.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 




More information about the Help mailing list