XHTML was the fad for a while – you were a bad coder if your markup wasn’t valid XHTML. Now it’s fading out.
Giorgio Sironi’s recent look at what happened to XHTML got me thinking: What was the point of all this? Why was XHTML useful, or was it?
XHTML educated developers
Before XHTML, it was okay to be loose and sloppy. The browser is going to fix it!
At least for myself, with XHTML came validators and people generally seemed to mind that their documents actually were properly validated according to spec. The fact that if you served XHTML with the correct mimetype, it actually made some browsers display an XML validation error and nothing more, might also have helped.
XHTML was like that strict math teacher you had in elementary school. A tiny mistake there and oh boy now you’ve done it. (Any resemblance to any actual teachers is completely accidental)
XHTML brought forwards the importance of separating structure from presentation
Since XHTML deprecated tags such as
<font>, it made for yet more reasons to use CSS.
XHTML’s legacy: Valid documents
Put everything together and XHTML really made way for enabling us to write better web applications.
The reduced complexity of markup improves load speeds
The use of CSS instead of tags allowed for better, uniform, styling of entire sites/apps
Overall, I think XHTML brought increased awareness of writing good markup.
A new enemy
With the situation of style vs markup improved, there is now a new enemy…
Spanitis and divitis.
The pointless use of divs and spans, when you don’t really need them. Will HTML5, with its new semantic elements, improve this situation like XHTML improved styling and validation?
Leave your thoughts in the comments!