[html5] Using <section> and <h1> ? Theoretical?

Ian Hickson ian at hixie.ch
Wed May 14 12:39:51 PDT 2014


On Wed, 14 May 2014, Jukka K. Korpela wrote:
> 
> And <h2> and friends have worked well even longer. The question is 
> really why the use of <h1>, relying on support to <section>, is allowed 
> at all (and often seen as recommended and “more logical”).

I encourage you to go back to the discussions that we had in 2004-2005 
about this on the main WHATWG list, or even the discussions that the 
XHTML2 team had on their list before that.


> Either <h1> is first level heading or it is something else.

It's something else. Specifically, it's the highest-rank heading element.


> The idea that it might be first level either relative to the page as a 
> whole or as relative to some enclosing <section> or another element 
> obviously confuses people.

It's always relative to the current section.


> It is even more confusing to say that for a section heading, you can use 
> either <h1> or <h2>.

You can use <h6>, too. The way the outline algorithm works, it doesn't 
matter which you use. That's why you can use <h1>-<h6> and <section> 
together and have it just work in both new UAs and legacy UAs.


> The only potential benefit from using <h1> as relative to <section> (or 
> something similar) is that you can cut and paste, or otherwise copy, a 
> fragment of an HTML page and put it inside a <section> of another page, 
> without changing the markup.

That's a big advantage, yes. Even bigger is being able to do this within 
the same page.


> Does this really justify the confusion?

The only confusion I've seen stems from the way the W3C has forked the 
spec and changed this part of it.

-- 
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