W3C home > Mailing lists > Public > www-validator@w3.org > August 2012

Re: Issue with the markup validator and img name

From: Michael[tm] Smith <mike@w3.org>
Date: Thu, 23 Aug 2012 14:30:35 +0900
To: tb-w3cvalidator@peperoni.de
Cc: www-validator@w3.org
Message-ID: <20120823053034.GH1824@sideshowbarker>
tb-w3cvalidator@peperoni.de, 2012-08-22 19:21 +0200:

> Hello,
> 
> I have an issue with the markup validator regarding the "img" tag in
> various mobile flavors of XHTML. We are integrating mobile ads into our
> XHTML pages, but this one does not pass our validator installation
> because of the "name" attribute:
> 
> <img alt="" height="1" width="1" name="trackingUrl" src="http://...."/>
> [...]
> Which one is right? 
> - Is the W3C comparison table wrong AND our validator installation is broken? 
>   (i.e. there is a "name" attribute for the "img" tag)
> - Or is http://validator.w3.org/ broken? 
>   (i.e. there is no "name" attribute for the "img" tag)

I don't know the answer to those specific questions, but I think the
general answer is that there's no good reason to be using the name
attribute on the img element. Browsers don't do anything with it, nor do
any other applications that I'm aware of. It's also definitely not valid in
the current HTML spec (HTML5), so if you care about conforming to the
current HTML spec, you shouldn't use the name attribute on img.

  --Mike

-- 
Michael[tm] Smith http://people.w3.org/mike
Received on Thursday, 23 August 2012 05:30:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 23 August 2012 05:30:45 GMT