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

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
http://lachy.id.au/

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