Re: XML style closing syntax

On Thu, 25 Sep 2003, Jim Barter wrote:

> The above code validates as HTML 4.01 transitional - even though the img
> tag has XML style closing syntax
>
> can someone tell me if this is correct?

It is correct in the sense that the document is valid when HTML 4.01
Transitional doctype is used. But the reason is that
<img src="somegraphic.gif" alt="" />
is by HTML rules equivalent to
<img src="somegraphic.gif" alt="" >>
That is, the solidus (slash) acts as tag close character, and the greater
than sign after it is a data character.

Longer explanation: http://www.cs.tut.fi/~jkorpela/html/empty.html

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Thursday, 25 September 2003 14:30:26 UTC