5 ms·
Agreed. That’s why I liked XHTML when it came out – it’s hard to believe that’s more than two decades ago! While HTML5 had lots of goodies, I liked the rigour t
by Anthony-G 5y ago
Agreed. That’s why I liked XHTML when it came out – it’s hard to believe that’s more than two decades ago! While HTML5 had lots of goodies, I liked the rigour that XHTML imposed on web authors.
- badsectoracula 5y agoIn theory XHTML was nice as it allowed easier parsing of pages, but in practice it was doomed to fail from the moment a single bracket off made entire sites to stop working. That W3C put their hands in their ears going all lalalalala while ignoring how the world actually used HTML is what led to their irrelevance in defining HTML and essentially giving control to Google, et al. IMO the "robustness principle" is a good thing because it realizes that people make mistakes and their goal isn't to make something correct but something that produces the results they want to see. Even if browsers started with XHTML-like strictness with no alternative, that strictness would quickly have eroded during the first browser wars.
- aaaaaaaaaaab 5y agoDelete a semicolon from a C/C++/Java/C# program, and it won’t compile. Delete a byte from a zip file, and it won’t unzip. I don’t see why HTML should be different…
- FridgeSeal 5y agoYeah I don’t see how that is supposed to be a benefit? Why _shouldn’t_ people have to make actually-valid-html? We don’t tolerate “only sort of correct JSON” tightening the acceptable requirements for valid HTML and CSS would likely make using those formats in more places _easier_.
- deleted 5y ago[deleted]
- badsectoracula 5y agoCompiling is something that happens locally and is static - it either compiles now or it doesn't and once you have the final executable you can distribute to your users the syntactical errors or whatever of your source code doesn't matter after that. HTML is different because it is parsed by the browser the end user is using when it is using it. If a site completely broke like, f.e. how Mozilla treated bad XHTML sites (instead of showing the site itself you'd get some yellow page with the error) when you got a tiny syntax error then anything with user generated content (forums, blogs, etc) or even just generated could be a potential minefield. Especially as websites started adding code from external sources (be it for ads or for things like youtube embeds or whatever).
- xpressvideoz 5y agoAnd after all these years, those people surrendered and started to stick to mandatory closing tags when React was introduced, proving XHTML was right. How amusing.
- nauticacom 5y agoYes, because everybody has willingly surrendered to the horrors of React hegemony
- wnevets 5y ago> And after all these years, those people surrendered and started to stick to mandatory closing tags when React was introduced, proving XHTML was right. I would argue HTML has been way more successful than React and thus XHTML hasn't been proven right.
- fregante 5y agoJSX requires a build though, it's easier to enforce syntax when a missing character will just work while writing it. There are no JSX errors at runtime for this reason.
- Sohcahtoa82 5y ago> but in practice it was doomed to fail from the moment a single bracket off made entire sites to stop working. Maybe the solution was to not publish sites that are a bracket off. I think half the problems with JavaScript are because of its weak typing. 1 + {} should be a type error.
- zerocount 5y agoNo, half the problems with JavaScript are because people refuse to learn it. Just don't write 1+{}. Every time people start bashing JavaScript, it's with these odd-ball examples that they make up.