HTML5 is the latest revision of the web markup language standard - it addresses the shortcomings of HTML 4 and XHTML, and also adds new features. Adoption of HTML5 depends, of course, on the degree to which browsers support HTML5 features. Luckily for us, support - especially for the features we'll focus on here - is especially strong among mobile browsers.
HTML5 is in part an acceptance of the fact that browsers tolerate lots of bad code, that perhaps we need not be so strict with requiring end tags and case sensitivity, and that making obsolete some ten years' worth of existing web pages would be catastrophic.
As an example of this flexibility, all of the following are permitted in HTML5:
As the above shows:
This new flexibility could lead to a bit of chaos on your development team. Different HTML authors will take different approaches. Our recommendation is that you choose one approach and stick to it. In this course, for example, we use the following guidelines:
Of course, your choices here must also take into account your expected audience's use of older browsers - a self-closed div, for instance, won't work in Internet Explorer 7 and 8.