W3C home > Mailing lists > Public > www-validator@w3.org > September 2003

Re: XML style closing syntax

From: David Dorward <david@dorward.me.uk>
Date: Thu, 25 Sep 2003 17:37:59 +0100
To: Jim Barter <jim@technophobia.co.uk>
Cc: www-validator@w3.org
Message-ID: <20030925163759.GD27346@us-lot.org>

On Thu, Sep 25, 2003 at 01:18:36PM +0100, Jim Barter wrote:
> <img src="somegraphic.gif" alt="" />
> 
> The above code validates as HTML 4.01 transitional - even though the img tag
> has XML style closing syntax

Yes, this is correct... however it doesn't mean the same thing in HTML
and it does in XHTML. In HTML it is shorthand for:

<img src="somegraphic.gif" alt="">>

(Note the extra ">" - a browser that implements the spec correctly will
render that as a visible &gt; in the document.)

-- 
David Dorward                                      http://dorward.me.uk
Received on Thursday, 25 September 2003 12:38:01 GMT

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