In defense of XHTML [en]
July 29th, 2009
Lasts weeks there has been a wide discussion about standards, mainly originated by the recent discontinuation of XHTML 2 in favour of HTML 5.
Suddenly, lots of XHTML detractors have emerged from their hideouts, most of them, as some realized, like saying “I told you”.
For all those, and some others, I have to say the following:
XHTML has failed in several points.
That’s true.
Has failed mainly in widespreading. It took like 7 or 8 years to reach a point where we could say that most developers were using XHTML.
Has failed also in acomplishing its implicit step-to-XML aim. Lots of people complaint that the whole XHTML thing was a lie because XHTML is mainly served to user agents like html/text.
But.
First. If XHTML widespreading has failed it’s not because the standard itself. It’s because we are working in a profession that moves too fast, with an absolute lack of higher and any other kind of education, and with plenty of new people starting every day to learn web programming with no basis at all, with nowhere to go to learn (did I already say that?), everyone coming from very different fields (graphic design, computing, programming). Everyone self-learning from each other codes, not necesary good examples, in a very anarchic way. An absolute chaos.
Elemental HTML was very easy to understand for everybody. Tags were a few easy “codes” to assign aspect to a content, even far easier with a WYSIWYG tools. Ta-da! Your own web site! That easyness was an open invitation for many to join a new and exciting profession.
But then, new concepts, like separation of content (semantic content), design and functionality arrived. Order arrived. “Huh!”, too much for those who were used to the old way. What happenend then? Plenty of “proffesionals” who arrived precisely because this programming-websites thing was such an affordable task (a bit of photoshoping and a bit of code copy-pasting) were suddenly in a hard position. Now, they should start learning something, really. Did they start looking for a new job? No, not really, well maybe some, but most of them kept doing more or less the same thing for ages. And, as I said before, many more continued arriving to the proffesion and learning from those who already were in it.
To be fair, it was not only inexperienced developers fault. Market was claiming for more and more web designers. Every single company was needing a website. The train was in motion, it couldn’t stop for people to learn so many weird new things. That new stuff could always wait for another day. After all, oldie HTML worked pretty well. Don’t cha think? Where was the problem?
In a so distressing scene, it took what it took for XHTML to take off. XHTML’s fault? Not at all.
But yes, some still claim that the problem is that XHTML is very complex. Well, I find that a huge fallacy. First of all, complex for whom? For non proffesional use there are, and always there will be, tools to easily publish contents in the internet, for everybody. But, for proffesional use, I defend that HTML, or whatever any other script or programming language, has to be as complex as needed to acomplish its goals. Obviously that doesn’t mean that we have to complicate it more than strictly necessary. But we are speaking about a task that is part of a qualified proffesion. If you are not able to understand XHTML or CSS, I’m sorry but then you are trying in the wrong proffesion.
Second. I find the step-to-XML failure argument a bad excuse to generate controversy. It’s true that the final goal of XHTML was supposed to be that. But it’s very demagogic to say that XHTML was a lie just because of that. Because …
… thanks heaven XHTML arrived …
… and broght so many essential things:
Semantics. XHTML was the first standard that deprecated non semantic tags, like b or i. You can consideer that an unimportant detail, but it’s a whole change of vision. Once a developer could understand why b and i old friends were now forbbiden, it could start understanding what semantic means, afterward that understanding he/she could never see code like it used to see it before.
That new vision changed everything. Because, althought HTML 4.01 was pretty close of semantics in intention, it was not 100% semantic. XHTML broke with that. Then, everything started, layouts without tables, spread use of CSS, accesibility, unintrusive javascript, and so on. There was a whole change in the air and everything started growing together. Not only because the arrive of XHTML, of course, but we have to admit that XHTML was in the middle of that huge change.
Order. XHTML brought order in every sense. HTML was permissive with the use of single quotes, double quotes, or no quotes at all for attribute values. That mess ended with the arrive of XHTML. The same happened with lower and capital letters. Lower letters were established for elements and attributes in XHTML. – Oh, come on, Jeremy, how can you say that the indistinct use of lower or capital letters is a question of personal choice? You mean a question of tastes? Please! Remember how code used to be with that permissivity?!
Code is not always for your own personal use. Other people, not just user agents, should be able to read your code. Other people can continue mantaining your work. The same way that safety belt use is compulsory when you drive your own personal car, a minimun strictness in syntax, even for your own personal safety, must be established.
Now again, will we step backwards to that age? Shall we be lenient when, for the first time, things seem to be improving a little bit?
Oh, no! They are coming back!
Some developers that rejected XHTML from the begging, some of them those pseudo-proffesionals I mentioned before (some others of course not), feel now like very brave to proudly claim “I was right, not XHTML, but HTML always was the real way!”? That frightens me a lot. It’s like they were all hidden in caves waiting an oportunity like this to come out with their nasty code.
For those, for whom the important thing was never the code but its result (understanding result as “what is shown in the screen”), what I have to say is: You were wrong before and you are wrong now.
Finally.
It’s true that HTML 5 is supposed to be a continuation of XHTML, removing the X of the XML failed experiment, and adding plenty of new and exciting things, but I find too many gaps in this new way to be happy with that.
I know that most web developers have complaint of the standards development slowness. But, forgetting the fact that standards developers could, in the same way, also complaint of the the standards adoption slowness by web developers, my point is that, after all, good things always need time.
And if we have waited so much for the last brand-new standard, it should be perfect, or almost perfect. But I find so many imperfections so far, specially in semantics and in syntax, that I really can’t hard believe it.
As I said before in my Spanish post about HTML 5: We can’t forget that we are speaking about the standard that will rule in the most important communication enviroment for humanity in the next decades.
It shouldn’t be mistreated, in any aspect, like a trivial thing. And with statements like this I find evident proves that in HTML 5 philosophy there is a bit of slackness in favour of immeadiacy.
For the time being, long live XHTML!
Note: I wrote this article in English in order to reach more people, but as you had already realized I’m not English speaker, my excuses.
Some articles and discussions you should not lose (updated 3/8/2009):
- John Allsopp: Semantics in HTML 5 (6/1/2009)
- Zeldman: HTML 5: NAV ambiguity resolved (13/7/2009)
- Bruce Lawson: HTML 5 is a mess (16/7/2009)
- Jeremy Keith: The HTML5 equilibrium (2/8/2009)
Este artículo tiene 11 comentarios.
Categorizado en: Desarrollo Web, Estándares, Opinión.