W3C home > Mailing lists > Public > www-validator@w3.org > June 2006

Re: end tag for "img" omitted, but OMITTAG NO was specified .

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 09 Jun 2006 00:43:49 +1000
Message-ID: <448837A5.7000408@lachy.id.au>
To: dickinson@lawnbowls.plus.com
CC: www-validator@w3.org

Lesley Dickinson wrote:
> The input (over which I have no control) results in an invalid XHML page
> as this line it produces is incorrect:
> <a href="http://news.search.yahoo.com/news"><img
> src="http://us.i1.yimg.com/us.yimg.com/i/us/nws/th/main_142.gif"
> width="142" height="18" border="0" alt="Yahoo! News"></a><br />
> 2) I think I am clutching at straws, but is there anything I can do
> about this within my input line which is:

You can stop falsely claiming to use XHTML when you're not using it 
properly, and stick with HTML 4.01 Transitional (that line is not valid 
in HTML 4.01 Strict because of the border attribute, but it is in 
Transitional).  That way you don't need to modify the code you cannot 
control, just modify your code that you do have control over and accept 
it as is.

The <br /> in that line should be <br>, but technically won't cause a 
validation error.  It actually has a different meaning from the same 
syntax in XHTML, but luckily browsers don't implement that feature 
properly and you can get away with it if you really can't fix it.

You should try and ask the content provider to fix their code anyway. 
They probably won't, but there's no harm in asking.

Lachlan Hunt
Received on Thursday, 8 June 2006 14:44:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:48 UTC