Getting HTML5 to display in IE9

I’m started reading how to program HTML 5 by following Sitepoint’s book on the subject. I’ve created a very simple HTML file but when I open it in IE 9, it isn’t displaying as I’d expect it to. For example, the tag <details> & <summary> aren’t showing a collasped element.

I’m using Visual Studio 2010 and I created an ASP project so I thought this was the issue but even when I copy the text into a regular file with a .HTML extension, the page is rendered correctly.

Any ideas?

I have noticed that when I use Chrome v14 that the expected features do show up, weird.

“Is” or “isn’t”? Although most HTML5 elements should display correctly; the support for HTML5 in IE9, unfortunately isn’t really that great. Can you post your code here?

See this page on HTML5 support in IE9 where it list what is supported and what isn’t. You’ll find that your experience matches up.

Basically, HTML5 is still in draft mode, and only has patchy support among most web browsers. Some provide near-full support, whereas others do not.
HTML5 is far too new to use for public web pages. Give it 5 years or so though, and web browsers should have caught up by then.

There are JavaScript plugins (such as Modernizr) to help browsers pretend to understand HTML5. As has been said, though, it’s premature to use much of what is proposed in HTML5 at this stage. If playing with it, use a minimum of new elements. It’s not even known at this stage which will actually survive. Things like <hgroup> are possibly on the chopping block, for example.

I’ve just reacquainted myself with the contents of that book, and the page on the details element says:

[indent]So far, details has little to no support in browsers. A couple of JavaScript-based polyfills are available, including one my Matthias Bynens.
Bulletproof HTML5 <details> fallback using jQuery · Mathias Bynens[/indent]

So, having RTFM has helped me out there.