Code quality - HTML 5
What is HTML 5?
HTML 5 is the long-awaited successor to HTML 4, the standard web markup language which has been with us for well over a decade now. If the development of a new web standard has mostly passed you by so far, you can expect to hear a lot more about it over the coming months as media interest increases. For example, coverage of the recent release of Internet Explorer 9 and Firefox 4 has focused attention on the abilities of both these browsers to handle HTML 5-based content. However, if you inferred from this that release of HTML 5 is imminent, you'd be wrong - it's a long way off yet.
So what's the timetable?
It won't surprise anyone in the online world to hear that the HTML 5 project has already been running for many years, is behind deadline and growing in complexity by the day.
In point of fact, HTML 5 is being developed by not one but two bodies: the World Wide Web Consortium (W3C - www.w3.org) and the Web Hypertext Application Technology Working Group (WHATWG - www.whatwg.org). Many key players are participating, including the four major browser vendors (Apple, Mozilla, Opera and Microsoft) and a range of other organisations and individuals with diverse interests and expertise.
Work commenced in 2004, but it was not until 2008 that the W3C Working Group published the First Public Working Draft1 of the official specification. The original timetable envisaged that HTML 5 would reach final sign-off by late 2010 but that date has come and gone. At April 2011, the latest plan is to move to 'Last Call' (an invitation to communities inside and outside W3C to confirm the technical soundness of the specification) in May 2011, with a target of 2014 for full 'Recommendation' (i.e. when HTML 5 becomes the officially recognised standard).
Why do we need HTML 5?
HTML 4 has been around for well over a decade now - an eternity in the technology world - and publishers seeking new techniques to provide enhanced functionality are being held back by the constraints of the language and browsers. HTML 5 is an attempt to meet that challenge with an improved, unified and consistent markup language for both content and applications, resulting in significant benefits across the entire panoply of modern web-enabled devices ('interoperability', as it's known).
Just two examples of the key differences between HTML 4.1 and HTML 5:
One key 'interoperability' challenge is to take multimedia to the next level. Although multimedia has made breathtaking progress in recent years, developers rely heavily on APIs and plugins to make it work - resulting in problems such as the iPhone not supporting Flash. HTML 5 includes video and audio elements designed to enable multimedia to be embedded into web pages directly. This should make it far easier to ensure that multimedia content can be accessed without any problems on a PC, tablet, phone or other device.
More logical page structures
First we had tables and then we had stylesheets - a major leap forward that freed up web page design and led to the incredible sophistication of modern sites. HTML 5 is another logical step forward: new elements have been introduced to identify page sections – e.g. <header> <footer>, <nav>, <article> and <footer>. This should not only make it easier to build and change pages (less reliance on IDs and classes), but it's good for assistive technologies as well, making navigation that little bit easier.
For more details on the numerous differences between HTML 4 and 5, see the W3C article at http://dev.w3.org/html5/html4-differences/
Should we be using HTML 5 now?
HTML 5 is very much a work in progress and there's still a long way to go before it's been thoroughly specified, tested and declared fit for purpose. Although developers and designers everywhere are champing at the bit, Philippe Le Hegaret, W3C interaction domain leader, issued the following note of caution in October 2010: "The problem we're facing right now is there is already a lot of excitement for HTML 5, but it's a little too early to deploy it because we're running into interoperability issues."
Having said that, it would be wrong to suggest that nothing should be done until HTML 5 gets the official green light. This is all part of the non-stop evolution of web technology and developers are quite naturally already experimenting with innovative features such as the <video> tag. However, there's a very long way to go before compatibility and stability issues have been ironed out, so you need to be clear about any risks you are taking. This is a time not to get over-excited by the hype, or to allow yourself to be swayed by web agencies who see opportunities for extra business!
For more information on HTML 5 compatibility issues, see www.caniuse.com
Is it ok to change my doctype to HTML 5?
Some online pundits are already advocating changing all your doctypes to the new, simpler HTML 5 version: <!DOCTYPE html> since many of the tags defined in HTML 4 are still supported in the newer version. Sitemorse recommends against it simply because it's far too early. HTML 5 is supported by hardly any browsers at this point and there's no reason to risk any kind of confusion with your page coding. Mislabelling a page runs the risk that it won't validate properly, and labelling an HTML 4 page as HTML 5 is not only incorrect, it provides no useful benefits.
Does Sitemorse support HTML 5?
Sitemorse does not currently officially support HTML 5 as the new standard is still a long way off from being finalised. However, we have partial HTML 5 support that is intended to prevent its use producing spurious errors in Sitemorse reports. We are constantly monitoring the situation and are happy to answer any queries you may have relating to your use of HTML 5 and its impact on your Sitemorse reports.
- W3C Working Draft 22 January 2008: 'HTML 5: A vocabulary and associated APIs for HTML and XHTML': http://www.w3.org/TR/2008/WD-html5-20080122
- W3C press release: 'W3C Confirms May 2011 for HTML5 Last Call, Targets 2014 for HTML5 Standard': http://www.w3.org/2011/02/htmlwg-pr.html.en
- Steve Jobs: 'Thoughts on Flash': http://www.apple.com/hotnews/thoughts-on-flash
Infoworld.com: 'W3C: Hold off on deploying HTML5 in websites': http://www.infoworld.com/d/application-development/w3c-hold-deploying-html5-in-websites-041
W3C: HTML5 differences from HTML4: http://dev.w3.org/html5/html4-differences
Article published: April 2011
The Sitemorse Knowledge base is the repository of knowledge about the Sitemorse system.
Every time a new feature is added, a question asked or anything our technical team believe might be appropriate is recorded here.
- Understanding the tests conducted by Sitemorse
- Interpreting Sitemorse Reports
- Useful Technologies
- Sitemorse Surveys
- Function Diagnostics
- Accessibility Diagnostics
- Code quality
- Code quality Diagnostics
- Email Diagnostics
- Metadata Diagnostics
- Customer Service and Billing Questions
- Updates and development within Sitemorse