3 ms·
Foreign elements are elements from XML namespaces so obviously XML rules apply. > That’s not the same thing as “HTML doesn’t have them”. HTML has always ignor
by wvenable 5y ago
Foreign elements are elements from XML namespaces so obviously XML rules apply.
> That’s not the same thing as “HTML doesn’t have them”.
HTML has always ignored them. They have no affect on any HTML element. If you attempt to use them as in XML, on normal elements, they do not close that element. If you use them on void elements, they obviously also do nothing. It's utterly meaningless in HTML.
- JimDabell 5y ago> HTML has always ignored them. No, browsers have always ignored them. Until HTML5 came along, they were the start of a NET. It was incorrect syntax that would probably end up causing a parse error later in the document thus mangling it. However because browsers didn't fully comply with SGML-based HTML parsing, the mangling didn’t happen and the result was that this syntax mistake would have no effect. Two bugs cancelling each other out. That is a different situation to HTML5, which explicitly states that it’s an acceptable no-op. “This is okay, but you don’t need to do anything with it” is a different situation to “This is a NET” followed by “I don’t know what a NET is, so I’m going to mis-parse it as an attribute and then ignore it because it makes no sense as an attribute”.