[whatwg] <h1> to <h6> in <body>

Matthew Thomas mpt at myrealbox.com
Fri Apr 1 02:17:44 PST 2005

Ian Hickson wrote:
 > Note that the difference between <title> and <h1> is not that <title>
 > is expected to include author information or whatever.

You personally may not expect it, but that is the inevitable and 
unsurprising effect of it being used as "a context-free label to be used
to describe the page elsewhere", in the absence of simply-specified and 
-supported markup for author, publisher, parent, and so on.

 > The example I gave earlier, of a Wikipedia page, shows the difference
 > I meant:
 >    <title>Main Page - Wikipedia, the Free Encyclopedia</title>
 >    ...
 >    <h1>Main Page</h1>

That example shows what I was talking about: <title> being used to 
contain non-title data -- the publisher in this case -- separated by 
arbitrary (and therefore difficult-to-parse) punctuation from the title 

 > Another example:
 >    <title>Introduction to the mating rituals of bees</title>
 >    ...
 >    <h1>Introduction</h1>

And that's an unrealistic example, because it's treating two definitions 
of the word "Introduction" as if they were the same. (As a heading by 
itself, "Introduction" means an introductory section; but "Introduction 
to X" means a basic presentation of X.) As you collect more realistic 
examples, you'll find that they follow the pattern I described.

 > The point is that the <title> has to stand alone and represent the
 > document when taken out of context, whereas the <h1> is the header of
 > a document _in the context of the page_, i.e. when people already know
 > what the basic subject area is.
 > Thus the <title> is not in any sense the parent of the <h1> or other
 > headers.

Not in Web pages designed to work with HTML 4 browsers, no. But if 
you're requiring new browsers to present some rel= values, you could 
take advantage of that to let <title> really be a title.

 > > It is a bad idea for the meaning of an element to be markedly
 > > different from the meaning of its name. That is likely to cause
 > > confusion, non-conformance, and disrespect for the spec in general.
 > While I agree with this in general, and while I am aware of a huge
 > number of cases where the HTML language faito follow ls this design
 > principle, I don't see its relevance in this particular case.

The relevance is that it is exactly what you were planning to do with 

 > > Authors have been encouraged to misuse <title> so far for a
 > > different reason: the lack of a well-defined standard for presenting
 > > the other information they want shown in document summaries. So a
 > > better idea would be to explicitly define a very limited number of
 > > rel= attributes (as you already plan to do) to contain the non-title
 > > data that authors most often put in <title> -- mainly author and
 > > publisher -- and perhaps allow the rel= attribute to be placed in
 > > elements other than <link> and <a>.
 > While this sounds like a good idea in principle, I don't see how it
 > affects my point (in terms of the examples above).

The point is that you can do that to avoid entrenching a mismatch 
between the meaning of the <title> element and the meaning of its name.

Matthew Thomas

More information about the whatwg mailing list