[whatwg] Erroneous description of h1, h2, h3, etc. elements on Whatwg.org
Ian Hickson
ian at hixie.ch
Wed Jan 25 15:57:14 PST 2012
On Wed, 21 Sep 2011, Etienne Levesque Guitard wrote:
>
> Hello Community,
>
> I've noticed that under section 4.4.6 of the HTML5 spec on
> Whatwg.org<http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>,
> the description of h1, h2, h3, etc. is as follows:
>
> *These elements have a rank given by the number in their name. The h1
> element is said to have the highest rank, the h6 element has the lowest
> rank, and two elements with the same name have equal rank.*
>
> I propose a rewrite to this in order to cover changes in HTML5:
>
> *Unless they are contained within a section element, these elements have a
> rank given by the number in their name. The h1 element has the highest rank
> while the h6 element has the lowest rank. When used with the section
> element, the rank is determined by the nesting level of the given heading
> element within section elements.*
> *
> *
> I think this makes it more explicit for readers of the spec who won't go on
> section 4.4.11 to know exactly what the semantics mean.
Actually the rank applies even in a <section> element. Otherwise, things
would stop working if you did:
<section>
<h1>My Section</h1>
<h2>My subsection</h2>
</section>
The rank concept is used to figure out the relative level of the headings
in the document as a whole, it's not the end of the story. You can't just
ignore the outline section, that's the section that says what the outlines
mean.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list