There are a lot of new HTML 5 elements like <header>, <article>, <footer> etc. that browsers like IE 8 and versions prior to that, do not support. These browsers need some help recognizing the new HTML5 elements and Remy Sharp’s HTML 5 Shiv provides just that.
To use this script, it must be included before the <body> element (i.e. in the <head>).
To improve performance, include the CSS first and then this script. Here’s how to declare this script
<!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]—>
This script enables IE to acknowledge the new HTML 5 elements by directing it to create the elements using JavaScript. The conditional comment shown above only loads the html5 shiv code when the version of IE is lower than 9.
You also need some CSS styling to render the elements as block-level elements
Tweet
1 comment:
very good ! thanks !
Post a Comment