Re: Issue with the markup validator and img name

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 UTC