4 ms·
I honestly don't think either was the purpose. XHTML existed to make parsing easier. The only things you couldn't do in XHTML 1.1 Transitional that you could d
by amyjess 7y ago
I honestly don't think either was the purpose. XHTML existed to make parsing easier.
The only things you couldn't do in XHTML 1.1 Transitional that you could do in HTML were having unclosed tags and using uppercase in tag names. That's it.
Now yeah, the strict version tried to force you into semantically sound documents... but that was completely orthogonal to XHTML vs. HTML. Both XHTML and HTML were available in both transitional and strict forms.
The real problem is that HTML is a massive pain in the ass to parse. You can close tags out of order, some tags can't even be closed (<hr>), some tags can optionally be closed (<p>), nothing is case-sensitive, and because of how flexible SGML is, you need a DTD to properly parse any SGML implementation (fun fact: SGML allows for a bunch of different markup styles, but the HTML DTD explicitly disallows most of them). XHTML sought to eliminate all that by mapping HTML onto XML, which was much easier to parse.
- boomlinde 7y ago> I honestly don't think either was the purpose. XHTML existed to make parsing easier. That being the only goal would have resulted in a much simpler standard. Extension modules for example is completely orthogonal to that goal. I think that the standards themselves do a good job of describing what motivates them. > The only things you couldn't do in XHTML 1.1 that you could do in HTML were having unclosed tags and using uppercase in tag names. That's it. That's true, but ignores the opposite question—what you could do in XHTML that you could not in HTML.
- spiralx 7y agoCould you have unquoted attributes in transitional?
- amyjess 7y agoAh, I just checked, and no you can't. So I guess that's a third difference. Thanks for the correction! Another correction I noticed when looking that up: I meant to say XHTML 1.0 Transitional, not 1.1. 1.1 was Strict-only.
- spiralx 7y agoAnd thinking about it weren't value-less attributes also illegal? I remember doing a lot of <button disabled="disabled">...</button> in XHTML, instead of <button disabled>...</button> in HTML. Even SGML has problems with expressing an attribute like that from what I remember reading of someone's attempt to specify HTML 5 using an SGML DTD.