W3C home > Mailing lists > Public > public-html-comments@w3.org > September 2010

Re: self-closing tags in html5

From: William F Hammond <hammond@csc.albany.edu>
Date: Sun, 26 Sep 2010 19:15:53 -0400
To: whatwg@whatwg.org
Cc: public-html-comments@w3.org
Message-ID: <i7r5ggrt92.fsf@hilbert.math.albany.edu>

>> For example, while it is true that major browsers seem to treat "<p/>"
>> as an open tag, the relevant question for backward comptatibility is
>> whether anyone has been relying on the idea that "<p/>" can be used to
>> begin a non-empty paragraph.
>
> Sites unfortunately do things like that so we cannot introduce this as
> a  global syntax.

I see browsers doing this, but I have not seen sites doing it.

Does anyone seriously think that "<foo/>" is an ordinary open tag?

The question is not whether it has happened but whether it has been
done deliberately and systematically in significant quantity.  Do you
have evidence?

If "<foo/>" in the html namespace is to be an error, then the html5
spec needs an explicit statement of how the error recovery should
happen.

Right now I'm seeing DOMs built from <x><foo/>...</x> that serialize
to leapfrogged tags, i.e., <x><foo></x></foo>.  For example:

     http://math.albany.edu/pers/hammond/Test/leaptag.html

Html5 DOM building from text/html will be hard enough without the
syntactical schizophrenia of 8.1.2.1 (6).

                                    -- Bill

----------------------------------------------------------------------
William F. Hammond                   Dept. of Mathematics & Statistics
hammond@albany.edu                            The University at Albany
http://www.albany.edu/~hammond/                    Albany, NY (U.S.A.)
----------------------------------------------------------------------
Received on Sunday, 26 September 2010 23:17:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:14:05 GMT