DU <> wrote:
>> I use <h1> for a page title (I know that's duplicating the content
>> of the <title> element...)
>
> I'm not against this sort of duplication.
It's really not duplication, since <title> and <h1> elements have
different meanings, and they are just for different purposes, and
rendered differently. In particular, the <title> element content need
not be rendered at all, and it is meant to be rendered as external to
the document proper, e.g. in a browser window's upper bar, _outside_
the document canvas.
The duplication is slightly disturbing in some presentation situations,
e.g. when a text browser first prints the <title>, then the <h1> (by
the way, Lynx shows the <title> right aligned, the <h1> centered), or
when a speech browser reads both in succession - which can probably be
changed from browser settings, but normally should not be done, since
so often a page lacks a (meaningful) <title> element, or a (meaningful)
<h1> element. But as a whole, this price is worth paying.
> In fact, I think this
> sort of duplication should be sought, deliberate.
Duplication of information, yes. Not necessarily duplication of
wording.
> Duplication from
> the text link leading to the targeted document, to the
> document.title, to the <h1> page heading and to the site navigation
> aid indicating the relative position of the document within a
> website: they should all say the same for the sake of consistency
> and clarity.
All three _could_ be similarly worded, but they could, and often
should, be differently worded. The texts, although describing the same
document, have different meanings and purposes. In particular,
- link text should be understandable in the context of the linking
document, and should give an idea of how the linked document relates
to the current one
- <title> should be understandable in _any_ context
- <h1> should be understandable in a context where the document itself
is actually rendered, and it could utilize its context, and it should
be brief.
There's a school of thought in journalism that says that a heading
should be three or four words, including a verb in active form. And I
think it's a good rule of thumb, though not always feasible.
Link texts and <title> texts, on the other hand, should normally be
noun phrases.
OK, a "random" example. I have a page that has a long main heading:
<h1>How all human communication fails, except*by*accident,<br>
<small>or a commentary of <span lang="fi">Wiio</span>'s
laws</small></h1>
Not a good example, really, but we could end the heading at the first
(or second) comma to get a better one. The title, on the other hand, is
<title>A commentary of Wiio's laws</title>
and one might link to the page using, _for example_
<a href="http://www.cs.tut.fi/~jkorpela/wiio.html" title=
"How all human communication fails, except*by*accident.
An explanation and a commentary of Wiio's laws, by J. Korpela">
Wiio's laws</a>
in a context where someone just mentions the laws and links to my
document for a general reference. Note that the title attribute
in the <a> element is yet another type of title for a document,
typically used to give a more verbose explanation than the link text.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html