W3C home > Mailing lists > Public > www-validator@w3.org > September 2010

Re: [VE][108] - "id" as Attribute in Title Tag

From: <rolf@just-in-mind.se>
Date: Mon, 6 Sep 2010 09:54:07 +0200
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Cc: www-validator@w3.org
Message-ID: <OF0A744501.F3BF8983-ONC1257796.0029DFE5-C1257796.002B372D@just-in-mind.com>
Yes, it is HTML 4.01.

I'm using the "id" of the <title> element in JavaScript code, and it works 
fine, although it's not officially accepted in HTML 4.01.

"Jukka K. Korpela" <jkorpela@cs.tut.fi> 
2010-09-04 15:49

<www-validator@w3.org>, <rolf@just-in-mind.se>

Re: [VE][108] - "id" as Attribute in Title Tag

rolf@just-in-mind.se wrote:

> We get the error message - - -> there is no attribute "ID"
> for:
> <title id="title"> . . . . . </title>
> According to www.htmlref.com, "id" is a valid attribute.

It is in XHTML, but not in HTML 4.01, so apparently your document declares 

an HTML 4.01 doctype.

This is hardly a reason to move to XHTML, though. In which context would 
possibly want to use an id attribute on the <title> element? The element 
uniquely determinable anyway, since only one <title> element is allowed in 

The site you mention is not an authoritative reference, and it does not 
like a handy practical reference either. For example, they say "The title 
should be the first element found in the head", even though HTML syntax 
not impose such a restriction, and such placement can even be dangerous. 
you use a <meta> element to declare document encoding, then surely that 
should precede the <title> element if the latter contains any non-ASCII 

Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Monday, 6 September 2010 07:52:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:19 UTC