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

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

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Mon, 6 Sep 2010 18:09:29 +0300
Message-ID: <948819FB9F114A60B4CDB200BD1E59E4@JukanPC>
To: <rolf@just-in-mind.se>
Cc: <www-validator@w3.org>
rolf@just-in-mind.se wrote:

> 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.

It simply isn't part of HTML 4.01. If you use it because all browsers you 
have tested seem to recognize it, that's your choice, and probably not 
particularly risky, but it still isn't HTML 4.01 and your document isn't 
valid.

It's easiest to remove the id attribute from the <title> element and use
document.getElementsByTagName('title')[0]
in JavaScript to access that element.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Monday, 6 September 2010 15:10:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:43 GMT