HTML5 Without the Shiv

When it comes to the new HTML5 elements, most browsers can handle them just fine. All versions of Internet Explorer prior to IE9 won’t create dom structure for these elements. This seems like a bit of an issue.

Remy Sharp has created HTML5 shiv, a JavaScript file that enables these new elements, ensuring they affect the DOM when they appear in HTML. Whilst this script does an excelent job solving this issue, I feel that javascript should be used to add functionality to a page, it shouldn’t be required in order for a page to render.

Sometimes it’s possible to create a site that uses the HTML5 elements for semantics, but doesn’t rely on them for styling.

Take the following example:

    <li><a>Section 1</a></li>
    <li><a>Section 2</a></li>
    <li><a>Section 3</a></li>

We could style the <header> in some way, but in order to do that we would need to use HTML5 shiv. Or we could apply the styling to the <ul> instead. If we do that, we don’t need the shiv at all.

I think we should use the shiv where necessary, but try not to rely on it. Some great HTML5 sites that use HTML5 without using HTML5 shiv:

Edit: This site now uses the Shim as of 2013-04-28, but the number of users who will experience this polyfill is now very few.

Ok, that list is looking a bit sparse, if you’ve built an HTML5 site without javascript, or know of one, let me know.

Notice: Array to string conversion in /var/www/ on line 22

Fatal error: Uncaught Error: Function name must be a string in /var/www/ Stack trace: #0 /var/www/ tags(Object(page)) #1 /var/www/ require('/var/www/joshem...') #2 /var/www/ tpl::loadFile('/var/www/joshem...', Array, true) #3 /var/www/ tpl::load('post', Array, true) #4 /var/www/ site->load() #5 /var/www/ require_once('/var/www/joshem...') #6 {main} thrown in /var/www/ on line 22