RE: ID Attribute

Not for HTML validation, it is for XHTML validation


http://validator.w3.org/check

Error  Line 377, Column 11: there is no attribute "ID".

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<script id="script_page_content" type="text/javascript">


-----Original Message-----
From: Ian Hickson [mailto:ian@hixie.ch] 
Sent: Thursday, March 12, 2009 11:29 PM
To: Chris Ward
Cc: public-html-comments@w3.org
Subject: Re: ID Attribute

On Thu, 12 Mar 2009, Chris Ward wrote:
>
> Will, or can, we see a change with the "ID" attribute. 
>  
> IMHO the "ID" attribute should be able to identify any element within an
> HTML document/DOM. 
>  
> However, there is 1 element and possibly others that do not use the "ID"
> element such as: 
>  
> <script>
> 
> I, myself, find it disturbing that I cannot give some sort of attribute 
> to a <script> tag to make it distinguishable for removal that is W3c 
> compliant, maybe I'm missing something very simple, I don't know.

id="" is valid on <script>.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 13 March 2009 15:13:50 UTC