[whatwg] self-closing tags in html5

William F Hammond hammond at csc.albany.edu
Sun Sep 26 16:15:53 PDT 2010


>> 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 at albany.edu                            The University at Albany
http://www.albany.edu/~hammond/                    Albany, NY (U.S.A.)
----------------------------------------------------------------------




More information about the whatwg mailing list