W3C home > Mailing lists > Public > www-validator@w3.org > January 2004

Name attribute for IMG tag

From: Forrest Meiere <FMeiere@sc.rr.com>
Date: Wed, 07 Jan 2004 22:49:13 -0500
Message-Id: <5.1.1.6.2.20040107224206.00bcb658@pop-server.sc.rr.com>
To: www-validator@w3.org
The W3C validator flags the attribute "Name" as invalid.  Apparently it 
wants to see "ID" instead.  Unfortunately, both of the most popular 
browsers, Netscape or Internet Explorer, require "Name" in such objects 
as    document.Home.src

This is necessary for uses such as the following code fragment
         <A HREF="../index.html" TARGET="_top"
            onMouseOver="document.Home.src='Home_Over.jpg';"
            onMouseOut="document.Home.src='Home.jpg';">
            <IMG NAME="Home" SRC="Home.jpg" HEIGHT="20"
                 WIDTH=100 BORDER=0 ALT="Home"> </A>

The attribute "ID" will not work for this application which is quite 
widespread and useful.

I could live with "ID" if you can suggest a work-around. Otherwise I will 
continue to violate your standards which I really don't want to do.

Best Wishes, Forrest Meiere
(843) 235-9478
on the web at  http://meiere.com
Received on Thursday, 8 January 2004 08:22:26 GMT

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