When working with HTML5 today, many of you know that you'll need to include the "HTML5 shiv" to ensure that CSS will recognize and be able to style those elements in browsers that aren't yet hip to HTML5.
Credit for that to Remy Sharp, Jon Neal, John Resig and anybody else who contributed to that idea. Also for the benefit of those non-hip browsers, it's best to reset many of the HTML5 elements to block-level as they should be:
var s = document.createElement('div');
s.innerHTML = "<section>Hi!</section>";
Or in jQuery:
Hip browsers do fine, but Internet Explorer will once again not recognize the new element and not apply CSS to it.
Joe Bartlett has written a great work-around to the problem called HTML5 innerShiv and I thought more people should be aware of it.
Update January 2013: This is now included in the canonical html5shiv project, you should use that. The rest of this project is a bit outdated. You don't need to do it this way anymore if you use the html5shiv.
2. Wrap all HTML content in innerShiv function before inserting
Here is the same jQuery example as above, made to work using innerShiv: