Last week I posted a couple of charts that demonstrated how well the new IE9 Beta supports HTML5 features. The first chart listed all the new HTML5 semantic elements (
<article>, etc.) and I had originally placed a red “X” next to most of those elements.
Thanks to a comment from Richard Kimber, I later changed the red Xs to yellow checkmarks. It was my assumption that since IE9 does not list those elements as strictly “supported” on its “new features in IE9″ pages, then that means we still need to use the HTML5 shiv script. Of course, if I had been paying attention, I would have noticed that the script is included using conditional comments that target every version of IE below IE9.
The reason for this is that while IE9 does not technically include the new semantic elements in its list of supported tags, it does have the ability to allow those elements to be styled. Here’s the explanation on the IE9 Beta Guide for Developers under the heading “HTML Parsing Improvements”:
Previously, Internet Explorer would parse elements it didn’t recognize as “unknown” elements. These elements would be flattened, which kept normal CSS styling rules from applying to them, and was not compliant with the HTML5 draft specification. Internet Explorer 9 Beta changes this behavior, and now parses unrecognized elements as “generic” elements, allowing them to function like normal elements do. This obviates the need for developer workarounds, like calling document.createElement to force Internet Explorer to recognize an element.
So since those elements don’t really have any attributes that belong to them (like the
src attribute), then the fact that IE9 doesn’t actually recognize them individually doesn’t really matter much (at least I don’t see a reason why it would matter). For CSS developers, all we care about is that we can style them without any JS hacks, and that they’re recognizable in the DOM.
IE9’s support of HTML5 is actually pretty good. It would be nice to see support for some of the form enhancements, Web Workers, Offline Web Apps, and a few others, but since the semantic elements don’t cause the same problems as previous versions, and since the video and audio tags and many other things are supported, that’s certainly a good start.