W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2008

[whatwg] The div element

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 29 Feb 2008 14:42:44 -0600
Message-ID: <dd0fbad0802291242s2eebd826u521287f39c4b4851@mail.gmail.com>
On Fri, Feb 29, 2008 at 1:04 PM, Dave Hodder <dmh at dmh.org.uk> wrote:

> Tab Atkins Jr. wrote (with snippage):
> >
> > In HTML5, the <hx> hierarchy is explicitly ignored.  Instead, they're
> > all treated the same.  The actual heading level is determined by
> > <section> nesting.
>
> That doesn't sound correct to me.  If they were all the same we could
> drop <h1> to <h6> and just use <h>.  Section 3.8.6 states: "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."
>
> Regards,
>
> Dave
>

Some clarification:  The <hn> elements do still have a rank, and this is
used when determining implicit sections.  Frex, if I have a page consisting
of an <h1>, some content, another <h1>, some content, an <h2>, and then some
content, I end up with two implicit sections, with the second containing an
implicit subsection.

When doing explicit sectioning (that is, with the <section> element), the
first heading element within a <section>(an <hn> or <header> tag) is taken
as the heading for that <section>, regardless of the rank of headers used
previously.  That is, the n in <hn> is ignored in favor of the explicitly
designated <section>.

HTML5 didn't switch to simply using <h> (or <heading> or something like
that) because that would prevent legacy user agents from doing their own
implicit sectioning properly.  Using pure <h1> interferes with this somewhat
as well, but it also greatly simplifies the use of headings, which was one
of the reasons to create an explicit <section> element in the first place.

This is over in the Headings &
Sections<http://www.w3.org/html/wg/html5/#headings0>area.  As well, I
would swear that Ian said that bit about using pure <h1>s,
but I can't find it at the moment.

~TJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080229/96fc3dcc/attachment.htm>
Received on Friday, 29 February 2008 12:42:44 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:39 UTC