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

Re: XML style closing syntax

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 25 Sep 2003 21:30:21 +0300 (EEST)
To: Jim Barter <jim@technophobia.co.uk>
Cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0309252127160.25368@korppi.cs.tut.fi>

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

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