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

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 UTC