Never has a W3C specification had such a rousing impact on the technology world as HTML5. So rousing in fact that not everyone could agree when creating the specification. So now we have the WHATWG version of the HTML5 specification. Then you throw in all the technical religious battles about what technology HTML5 will kill, the HTML5 as a mobile strategy discussions, and you get a lot of hype and misunderstandings. So let’s try and clarify three misunderstandings I have heard and read.
Misunderstandings
- HTML5 is a new technology. – HTML5 is not a new technology, it is actually a new specification/recommendation building on HTML, and HTML5 is now referred to as HTML. However, the “new technology” is the implementation of the specification within the web browser, and this could be argued either way.
- HTML5 is about animation and interaction. – This one is fuzzy. HTML5 (referred to as HTML from here on) is comprised of semantic markup and APIs. For instance, the HTML Canvas tag provides an API that leverages JavaScript to draw graphics and other elements natively within an HTML document. Yes, there is some level of animation and interaction, but those are done through very specific HTML APIs leveraging JavaScript. Animations and transformations are not part of the specification, but they are part of the CSS3 specification. On another note there are various HTML APIs that have nothing to do with interaction or animation (e.g. local storage).
- HTML5 is CSS + JavaScript + HTML. – NO! CSS is not part of the HTML specification. There are no rounded corners, embedded fonts, drop shadows, etc. HTML and CSS are two completely different specifications. JavaScript is also not part of the HTML specification. However the HTML specification does call for APIs that can only be leveraged with JavaScript. Canvas, cross-document communication, local storage, selectors, etc. are all leveraged by JavaScript through an API. The HTML specification does not call for any changes to JavaScript.
Summary
How strict do you want to be when discussing HTML5? I ask myself the same question all of the time. There are certain HTML APIs that are no longer part of the specification, or never were (e.g. geo location, SVG, Web Sockets, Web Database, etc.) and I often refer to it as HTML5 and not HTML. So I would say how strict should one be about the definition comes down to the context of the discussion. It is quicker to say HTML5 than HTML5/CSS3/JavaScript, but how about just going with “web standards stack?” That seems to cover it, wait.. some of the items are not yet official standards… oh forget that! And the circle of words never ends.
In the end call HTML5 what you will, but just know that it is “semantic markup and APIs and not CSS.”
Disclaimer – Like all people, I have opinions and that is what I have expressed here.