Re: changed advice on use of h1 headings in document outline.

Hey Jason,

This has been put on hold until someone - anyone - can tell me whether an
outline should be a description of depth, order or both :-)

With numbered headings, order is pertinent (eg. h2 following h1) but only
to describe... depth, ie. "nesting". With sectioning elements, order would
seem to be moot since placing a section _within_ a section surely denotes
nesting no matter where the section's heading comes. Eg:

      <h2>Surely a subsection</h2>
   <h1>Surely the subsection's parent</h1>

As you are aware, gsnedder's implementation rather elegantly promotes the
heading to show depth (hierarchy), rewriting order to do so:

Surely the subsection's parent
-> Surely a subsection

And the w3c's dev validator does this - again, as you are aware - instead:

-> Surely a subsection?
Surely the subsection's parent

The question is, which interpretation is better. And when I say
"interpretation", I don't mean of the spec', but of what the spec' _should_
state. That is:

Which interpretation is closest to what a reasonably intelligent dev' would
likely to be trying to achieve?

Is the second interpretation better because both depth _and_ order are
accounted for? Or is order a red herring? Does the order in the second
interpretation imply that the subsection is actually missing a parent
section and that "Surely the subsection's heading" is really unrelated?
Because my use of a section INSIDE a section begs to differ!

I prefer gsnedder's interpretation because I think hierarchy is paramount
and that order should not affect it. Why?

Because, in the real world, outside of HTML specification, "first" should
not always mean "most important", "primary" or "parent".

Thanks for your message, Jason, and sorry this has been sitting around. I
ask some related questions in an upcoming article, which should emerge some
time soon.

Cheers - Heydon.

On Mon, Apr 1, 2013 at 11:46 PM, Jason Kiss <>wrote:

> Hi Heydon,
> I'm wondering if you ever followed up on this question. I have the same
> one.
> It is not clear to me how the current outline algorithm mandates that
> "headings never rise above other sections", though I don't doubt that
> it very well might. The way the it is implemented at
> is quite different from how gsnedders'
> outline calculator ( or the h5o
> outliner ( interprets it.
> I, for one, would find it very helpful for someone who properly
> understands the algorithm to run through it step-by-step with the
> "Feathers" example to demonstrate how it creates the outline and
> explain why (or why not) the H1 that is an immediate descendant of
> <body> does not qualify as the heading for <body>.
> Whatever the correct interpretation is, this has important
> consequences for how devs will mark up their pages to get a "correct"
> outline.
> Cheers,
> Jason
> > On 27 February 2013 08:36, Heydon Pickering <>
> wrote:
> >>
> >> Okay, I'll try to fit that in.
> >>
> >> But, before I proceed, I've found a potential bug / inaccuracy in the
> >> current advise...
> >>
> >> I wonder if I could have this confirmed first because it impacts on my
> >> proposals.
> >>
> >> Under Sample Outlines
> >>
> >> (
> ),
> >> relating to the "Feathers" example, it states that "headings never
> >> rise above other sections". The example given is this:
> >>
> >> &lt;!DOCTYPE HTML&gt;
> >> &lt;title&gt;Feathers on The Site of Encyclopedic
> Knowledge&lt;/title&gt;
> >> &lt;section&gt;
> >>  &lt;h1&gt;A plea from our caretakers&lt;/h1&gt;
> >>  &lt;p&gt;Please, we beg of you, send help! We're stuck in the server
> >> room!&lt;/p&gt;
> >> &lt;/section&gt;
> >> &lt;h1&gt;Feathers&lt;/h1&gt;
> >> &lt;p&gt;Epidermal growths.&lt;/p&gt;
> >>
> >> The associated outline is illustrated like this:
> >>
> >>     1. (untitled page)
> >>         1. A plea from our caretakers
> >>     2. Feathers
> >>
> >> This doesn't make sense to me. The h1 of Feathers is an immediate
> >> descendant of &lt;body&gt;, surely making it body's de facto heading
> >> (there are no other headings in scope). Where has <em>untitled
> >> page</em> come from, then?
> >>
> >> If you paste the example into gsnedders' outline calculator
> >> ( it not only attests that
> >> "Feathers" is indeed the primary heading for &lt;body&gt; but it
> >> helpfully lets "Feathers" rise above the subsection to demonstrate its
> >> primacy, like so:
> >>
> >> 1. Feathers
> >>       1. A plea from our caretakers
> >>
> >> Surely, gsnedders' interpretation makes the greatest sense.
> >> Subsections describe importance based on depth, not order, after all.
> >> The h1's primacy is dependant on its elevation in the hierachy - and
> >> indeed it is unnested in both examples - but I believe &lt;body&gt; is
> >> simply not "untitled". Shouldn't "Feathers" adopt the <em>untitled
> >> section</em> spot...?

Received on Tuesday, 2 April 2013 17:08:11 UTC