[html5] Top Nav: in or out of Header?

Ian Hickson ian at hixie.ch
Mon Dec 23 19:23:32 PST 2013


On Mon, 23 Dec 2013, Cat wrote:
>
> What’s the wisdom/best practice on the idea of whether to include a top 
> nav within the <header> tag or have it be outside the <header>?

Either way is fine. If it's "top nav" then I probably would put it in the 
<header>, though, for what it's worth.

The <header> element is really nothing more than a convenient replacement 
for <div class="header">; it doesn't really mean much. If you look at the 
examples in the spec, you'll see there's that there's quite a variety: one 
example is just a heading with an "Welcome too..." paragraph before it; 
one is a heading with some information and navigation links; and the third 
has two entire sections (including a <nav> section) inside it.

   http://www.whatwg.org/html#the-header-element

In fact if you search for "<header" in the one-page spec, you'll find a 
number of other examples.

   http://www.whatwg.org/specs/web-apps/current-work/


On Mon, 23 Dec 2013, Brian Tremblay wrote:
> 
> [*] NB: afaik, <hgroup> has been depracated.

Nope, the <hgroup> element is alive and well. :-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the Help mailing list