W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2009

[whatwg] About Descendent Tags

From: James Graham <jgraham@opera.com>
Date: Tue, 07 Apr 2009 18:55:16 +0200
Message-ID: <49DB8574.2020007@opera.com>
Diego Eis wrote:
> This is not correct in HTML4?
> <h1>Romeo and Juliet</h1>
> <h3>a tragedy in Italian style</h3>

If you fed that markup into a tool that produced the outline of the 
document (e.g. for a screen reader, a toc generator or an ordinary 
browser navigation aid), it would look something like

+Romeo and Juliet
+--+--a tragedy in Italian style

Which isn't right; there is no subsection of the document called "a 
tragedy in Italian style". The idea of <header> is that you should be 
able to say:

<header>
<h1>Romeo and Juliet</h1>
<h3>a tragedy in Italian style</h3>
</header>

And get an outline like:

+Romeo and Juliet

As I have pointed out elsewhere the <header> element appears to be very 
confusingly named, hence I advocate introducing <hgroup> for this use 
case and either using <header> to mean "the generic top matter of the 
document" or finding some other, less ambiguous, name to mean the same 
thing.
Received on Tuesday, 7 April 2009 09:55:16 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:11 UTC