Skip to content
Permalink
main
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
title date published tags modified
HTML5 enabling script
2009-01-07 13:49:54
true
code
html
html5
javascript
2014-09-03 16:15:12

HTML5 enabling script

Since HTML5 is getting more attention by way of marking up our new pages, and the only way to get IE to acknowledge the new elements, such as <article>, is to use the HTML5 shiv, I've quickly put together a mini script that enables all the new elements.

Usage & Download

Download html5shiv.js and must be inserted in the head element (this is because IE needs to know about the element before it comes to render them - so it can't sit in the footer of the page, i.e. below the elements in question).

I've updated this post to link to Alexander Farkas's version of the shiv - it's the very latest and my simple one line script. The one I originally released was (I thought) beautifully small, but didn't support print styles nor dynamic injection of HTML5 elements. Good thing there are smarter folk than I!