« Django: Getting an administrative interface for almost free. | Main | Concurrent programming : Getting a stronger language in Erlang. »
July 18, 2007
HTML 5 : We don't need no XHTML
Rules are meant to be broken they say, and when it comes to web standards looks like the same holds true. XML was set to be everywhere, even influencing one of the web's pilars -- HTML -- in favor of XHTML....fast forward to summer 2007, and being retro is in : HTML has been revived as HTML 5. What does this mean ? What does it offer ? I'll try and recap the web's markup evolution and proposed future in this entry.
| [Entry continues to the left and below ad ] |
At the time XHTML's spec was announced by the W3C, moving from HTML's v.4.01 over to the XML based XHTML seemed like a natural step, heck I even wrote on article on performing such a task HTML 4.01 to XHTML 1.1 , but in hindsight, the appearance of HTML 5 is a resounding "we don't want no XHTML" or a more polite "we'd rather stick to what we know" from browser vendors and developers, with the almost guaranteed side effect : end users suffering at the expense of standards.
Recapping the historical background, XHTML was seen as a good successor to HTML 4.01 for various reasons, but the main reasons I personally saw were the following, in order of importance:
- HTML had mixed-in layout behaviours, allowing attributes like align, bgcolor and width to be placed directly inside markup. XHTML in effect enforced a cleaner content/layout separation, forcing designers/developers to use CSS for all their layout requirements.
- Another reason behind the XHTML push was that it would theoretically allow the delivery of this XML type markup -- properly closed, nested and devoid of layout behaviours -- to any type of device, not just a browser.
- And yet another reason was that HTML was based on the older and more immense SGML language, where as XHTML was to be based on XML, which provided a more simplified rework of SGML.
In hindsight once again -- and isn't it always 20/20 vision
- CSS adoption was huge by itself, so much in fact, that even though HTML 4.01 allowed layout attributes -- align, width, bgcolor, border -- or <font> to be used, it soon become just common to use CSS, making XHTML adoption simply unnecessary to enforce content/layout separation.
- Delivery of XHTML to multiple devices was a good idea, in an era when multiple markups -- like WML or HDML -- were required to deliver content on account of network latency issues around HTML's payload. But WiFi and a few wireless generations later, we have many devices that can consume HTML, such as iPhone's with rich HTML email clients.
- And the SGML foundations proved to be a moot point, while SGML is in fact complex when compared to XML, HTML and XHTML were mere sub-sets for both specs, so for practical purposes were both evolved from seemed to make no difference.
So here you have HTML revived as HTML 5 under none other than a W3C working group. ( NOTE: Although you should be aware that behind the scenes, much of this HTML 5 lobbying and battle was undergone by WHATG [Web Hypertext Application Technology Working Group] , a group formed by Apple, Mozilla and Opera...do a web search if you are interested at the time and events it took for the W3C to actually revive HTML 4.01 and simply incorporate HTML 5 as the WHATG set it out to be).
So here is a link to the HTML 5 Working Draft for your review, and my own personal list of relevant features:
- Document Object Model (DOM): Navigating and using the DOM has never been natural in browser environments, given its historical background. The appearance of AJAX has only made DOM more critical to navigate, and with it, HTML 5 will address many of the headaches faced when using the DOM.
- Forms : Lets face it, forms are busted in their current state. Coming to HTML 5, native data validation, support for elements like date, number, range and email, not to mention, improved file upload mechanisms.
- More funky tags: <p> and <div> are old, so how about more tags for what has become common nature on the web : <article>, <dialog>,<video>,<canvas> and <progress>, all coming in HTML 5.
The bad news : Everything is pretty much on paper as far as new features are concerned, so don't hold your breath as to when you will see this supported in Firefox, Opera or mmhh..Internet Explorer!
The good news: Somebody is paying attention, even if its taken years of listening and it will take more years to make it a reality. Someday you may have access to all these wonders HTML 5 offers, a sign of relief for those who never seemed to forget good old HTML.
| [Comments below ad ] |
Posted by Daniel at July 18, 2007 4:53 PM
Comments
This is progress, because it's based more on reality than on the usual spacy navel-gazing that defines our standards. Netscape was the dominant browser, then it fell behind, and Microsoft IE took over and "ad hoc" implemented what it could and what corporate politics allowed. Then years after it gained dominance, FireFox came along and tried to rewrite history. The result is a cross-browser coding disaster, and as a web developer of 15 years' experience, I blame Firefox more than IE. HTML 5 is a chance for both sides to fix their sites on something productive.
Posted by: Chris Borokowski at July 20, 2007 6:15 AM
Would you not say that moving to XHTML forced CSS to be adopted? If HTML 4 was still the standard, I don't think CSS would have seen the surge in use, or there would be an even worse mish-mash of HTML 4 and CSS then is currently being used.
Posted by: Nihilist at July 20, 2007 7:37 AM
Thank you.
Good summary for those of us who create web pages, but are not caught up in all the standards hype.
Posted by: Dave Barnes at July 20, 2007 7:49 AM
Hello,
Wow, very detailed and well informed.
However, I have few personal opinions regarding the issue with web development. I personally believe that its mere lazyness not to conform to XHTML standards, and to continue supporting an ill tagset "meta language" as HTML... if anything, XHTML ensures that all devices and interpreting languages are properally interpreted by DOM. This in the long run I suppose ensures a proper standard.
We must not forget that there is more too web development then '.html' files. We have to consider the fact that we can use our own DTD file to define our own tagsets, and if all your worried about is considering whether or not to end your tagset, or to use a differnt character case within your tagsets, that all can be considered inside the DTD. Infact, XHTML is a mere standardization of HTML, while considering a few deprecated keywords, which can eisly be added to the DTD. I hope that most browsers support interpreting the DTD. I figure not all device applications have the required memory or technology put into them to worry about the DTD interpretation, which could be an issue...
Further more, sure support both, heck, build dynamic applications that can process which the browser prefers or is applicable to support, all from within your application. In fact, I believe in the 2, but prefer and trust in XHTML.
Posted by: Barry Dick at July 20, 2007 8:21 AM
Oh dear goodness another lurking security cuprit. Just as the web developer community is learning to counter XSS, SQL Injection, AJAX vulnerabilities, an extra feature is added to HTML; native data validation.
Why is that a potential problem? Because you can't rely on data entry validation done "in the page" i.e. at the surfer's webbrowser.
And if you want to implement data entry validation "in page", just to achieve an attractive and responsive user interface, you still have to the same checks in the "back end". Question: how do you keep the "in page" and "backend" data entry validation checks in sync?
Its double and error prone work. It will either happen badly or not at all.
Well, I should have post this comment at the HTML 5 commitee.
In any case thanks for the soapbox ;-)
Posted by: Twan at July 20, 2007 8:24 AM
Wow. Looking through that draft just makes me wonder what the point is.
There is no way that a relevant tag for every minutia of a web document can be made without the language becoming an over burdened nightmare. I don't understand why they didn't just come up with guidelines for something like the 'rel' attribute which could be applied to block level and inline elements.
[div rel='section'] would seem far more extensible than the 'section' block level element. Especially when you start getting in to stuff like the 'dialog,' 'aside,' and 'meter' tags.
If the 'dialog' tag is to work, especially, it needs more differentiation from a definition list.
What about the 'hypothetical' tag? Or 'statistic?' You could list hundreds of tags that would make as much sense as the new tags in this draft; which is very little, indeed.
Although... I do have to say that I like the 'm' tag. It can stay :)
Posted by: Andrew Standfield at July 20, 2007 8:39 AM
This is crap. HTML 5.0 come on! I agree with what another user wrote - it's mere laziness that people are dealing with rather than "difficulty" conforming to standards.
We've finally arrived to a point where well-formed XHTML and CSS 2.0 are rendering VERY similar (if not identical) in all browsers.
I was a developer of cutting edge apps during the 4.0 browser wars and I never want to relive the nightmare of writing javascript for multiple DOMs.
We need standards.
Seperation of content from presentation!
Posted by: Paul S. at July 20, 2007 10:00 AM
"Would you not say that moving to XHTML forced CSS to be adopted?"
Because it would be false.
CSS was embraced by everyone, even though many (most?) did *not* move to XHTML. When sites that are clearly still using HTML 4.01 are nevertheless using CSS extensively, usually exclusively for all layout issues, it's an incontrovertible fact that it wasn't a move to XHTML that "forced" the adoption, because in fact no such move was made. Rather, it's the very useful nature of CSS in itself that caused it's near universal adoption. No one was forced to use CSS, they just did because it's too damn useful to ignore.
Posted by: Dreamsmith at July 20, 2007 10:17 AM
Just when I was starting to get my head around XHTML+CSS, y'all go and change things again. ;)
I have to agree with Twan about over-burdening the language with things like the new <article>, <dialog>,<video>,<canvas> and <progress> tags. Though these seem pretty benign, how do you know what else you'll need to add for the next generation of web apps. It may be slightly more cumbersome for people to roll their own <div> classes for these things, but doesn't it make the language more future-proof?
Posted by: Troy T. at July 20, 2007 12:08 PM
What possible benefit could there be over adding new features to HTML 4.01, rather than adding them to XHTML 1.1? XHTML 1.1 seems like a better choice in every way for a basis for an updated standard.
Posted by: Eric Smith at July 20, 2007 3:56 PM
XHTML certainly didn't force the transition to CSS. It did, however, linked very nicely with it, which promoted the use of CSS even more. Reviving HTML is a step in the wrong direction. Creating new shortcut tags for something that's commonly used these days is a complete absurd. Are we gonna create the forum and chat tags as well just because they are commonly used applications on the web?
Posted by: alkos333 at July 20, 2007 4:03 PM
Maybe I don't understand all these phylosophical considerations, but why this new stuff requires a new HTML version? expanding XHTML 2.0 modules was no good?
BTW, I'll stick with XHTML.
Posted by: MG55 at July 20, 2007 4:10 PM
For those complaining about HTML 5 in the comments, a few notes:
- If you don't serve your XHTML as application/html+xml, you don't really know if you are writing valid XHTML. Running your code through a validator is not enough.
- XHTML 2 is not compatible with XHTML 1.
- You can't use document.write() in your Javascript in XHTML. You have to use the DOM interface, which is a real pain.
Posted by: Tony Freixas at July 20, 2007 4:54 PM
Any changes to the web coding are going to have huge impact. I know that global issues like localization and accessability are in the forefront of the design goals. I would like to point out though that whatever the next step in the evolution of web coding is, it should serve humanity in a generic way and should have nothing to do with promoting Microsoft's vision for locking in all the user's in the world. IMHO Microsoft has had way too much influence on the programming paradigms we use today and I want to see the web remain vendor and operating system neutral. New standards should reflect what is best for everyone, and promote innovation. I would like to see us get to a point where web authors will not feel compelled to write IE specific content. If we don't have operating system/vendor neutrality, bad things happen.
Posted by: Douglas Goodall at July 21, 2007 4:18 AM
A note on the SGML/XML distinction: HTML and XHTML are directly based on SGML and XML: SGML and XML are inextricable parts of their syntax, HTML/XHTML haven't just evolved from SGML/XML. The "heritage" is therefore highly relevant to those having to read the syntax programmatically.
This means that if you have an XML parser, you can read XHTML, but not HTML in general.
Why is this important? The SGML base of HTML makes automated processing and validation (used by ASP, JSP and countless other applications) much, much harder, as all the standard tools have been focused at XML, and SGML is much more flexible (and therefore complicated).
Posted by: Jørgen Seland at July 22, 2007 11:39 PM
“HTML had mixed-in layout behaviours, allowing attributes like align, bgcolor and width to be placed directly inside markup. XHTML in effect enforced a cleaner content/layout separation, forcing designers/developers to use CSS for all their layout requirements.”
That is simply not true. XHTML 1.0 had the same feature set as HTML 4.01. It just refers to HTML 4.01 for semantics. XHTML 1.0 Transitional (what most people choose when they say they use XHTML) has all the same align, bgcolor and width as HTML 4.01 Transitional. On the other hand, HTML 4.01 Strict only has the attributes XHTML 1.0 Strict has.
“Another reason behind the XHTML push was that it would theoretically allow the delivery of this XML type markup -- properly closed, nested and devoid of layout behaviours -- to any type of device, not just a browser.”
This part of theory has utterly failed in practice. When theory and practice disagree, practice takes precedence. What works is adding an HTML parser to non-browser applications.
“And yet another reason was that HTML was based on the older and more immense SGML language, where as XHTML was to be based on XML, which provided a more simplified rework of SGML.”
HTML5 is not an SGML language.
“We've finally arrived to a point where well-formed XHTML and CSS 2.0 are rendering VERY similar (if not identical) in all browsers.”
That’s just an illusion. If you have that experience, you are serving it as text/html, in which case the browser treats your markup as broken HTML 4.01. There’s no XML parser involved. The HTML 5 spec admits this fact instead of pretending otherwise.
Posted by: Henri Sivonen at July 22, 2007 11:47 PM
There may indeed be good reasons to expand (X)HTML with new tags and better functionality. However, as some readers pointed out, I do not see the reason for a new HTML version.
The title of this article "HTML 5 : We don't need no XHTML" is misleading. None of the arguments provided by the authors are actually against the X of XHTML. Things apply equally to HTML and XHTML, so why not stick with the cleaner of the two, i.e., XHTML?
Posted by: Zellig at July 23, 2007 6:21 AM
Post a comment
Track back Pings
Track Back URL for this entry:
http://www.webforefront.com/mtblog/mt-tb.cgi/79.






