The structure was meant to be more strict syntactically, but almost universally browsers didn’t give a shit because it was way better for users to just “do your best” to process broken or sloppy xhtml/html
That being said, some of the rules meant to enhance the rigidity of html were brought in from the xhtml spec to HTML5.
While browsers will still do a “best attempt” at rendering the page, most websites aren’t even written in raw HTML anymore by devs, it’s either front end single page apps populating the dom or backend generated templates spitting out generated HTML, most of which generally follow the rules of html (except Wordpress, which needs to die in a cave)
Just to be that guy, 'use strict'; is specifically for JavaScript, and should still probably be used. With xHTML there were a few different DTDs that went in the DOCTYPE, Strict being one of them.
I’ve never quite managed to understand what the point of xHTML even was. Damn near all of the time, it was still sent as plain ole HTML
The structure was meant to be more strict syntactically, but almost universally browsers didn’t give a shit because it was way better for users to just “do your best” to process broken or sloppy xhtml/html
That being said, some of the rules meant to enhance the rigidity of html were brought in from the xhtml spec to HTML5.
While browsers will still do a “best attempt” at rendering the page, most websites aren’t even written in raw HTML anymore by devs, it’s either front end single page apps populating the dom or backend generated templates spitting out generated HTML, most of which generally follow the rules of html (except Wordpress, which needs to die in a cave)
‘use strict;’ for HTML is what I was always told, don’t take my word for it!
Just to be that guy,
'use strict';
is specifically for JavaScript, and should still probably be used. With xHTML there were a few different DTDs that went in the DOCTYPE,Strict
being one of them.Did xhtml come about as part of the semantic web project? I learned about the two at the same time, so I may be confused about that.
Potentially? I don’t recall, myself. But having markup that is more readily machine parsed would only help the semantic web’s goals.
I wish I’d not heard xHTML in a long time