[whatwg] self-closing tags in html5

yuhong yuhongbao_386 at hotmail.com
Sat May 14 02:48:10 PDT 2011




Kornel Lesiński wrote:
> 
> Parsing of non-HTML elements is not interoperable between IE and non-IE  
> browsers. IE already supports self-closing syntax on prefixed elements,  
> but other browsers don't:
> 
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%3E%0D%0A%3Cfoo%3Abar%2F%3Eaa%0D%0A%3Cfoo%3Abar%3Ebb%3C%2Ffoo%3Abar%3E
> 
> and IE cannot properly parse unknown non-prefixed elements, except when  
> (relatively new) workaround is used (http://ejohn.org/blog/html5-shiv):
> 
> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%3E%0D%0A%3Cfoobar%2F%3Eaa%0D%0A%3Cfoobar%3Ebb%3C%2Ffoobar%3E
> 
FYI, the reason is that IE5 supported mixing foreign XML content into HTML
long before HTML5 added this support. It is used for VML for example.
-- 
View this message in context: http://old.nabble.com/self-closing-tags-in-html5-tp29813776p31617157.html
Sent from the whatwg.org - whatwg mailing list archive at Nabble.com.




More information about the whatwg mailing list