Difference between revisions of "HTML5 Shiv"

From Web Education Community Group
Jump to: navigation, search
(Enabling HTML5 sectioning elements for legacy versions of IE)
 
 
Line 3: Line 3:
 
In your <head> section, point to an external script:
 
In your <head> section, point to an external script:
  
 +
<nowiki>
 
<!--[if lt IE 9]>
 
<!--[if lt IE 9]>
 
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
 
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
 
<![endif]-->
 
<![endif]-->
 
+
</nowiki>
  
 
Or download the code (See https://code.google.com/p/html5shiv/) and point to it locally:
 
Or download the code (See https://code.google.com/p/html5shiv/) and point to it locally:
  
 +
<nowiki>
 
<!--[if lt IE 9]>
 
<!--[if lt IE 9]>
 
<script src="dist/html5shiv.js"></script>
 
<script src="dist/html5shiv.js"></script>
 
<![endif]-->
 
<![endif]-->
 +
</nowiki>

Latest revision as of 14:08, 8 May 2013

To enable use of HTML5 sectioning elements in Internet Explorer 8 or less, use the HTML5 shiv (or shim) JavaScript.

In your <head> section, point to an external script:

<!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->

Or download the code (See https://code.google.com/p/html5shiv/) and point to it locally:

<!--[if lt IE 9]> <script src="dist/html5shiv.js"></script> <![endif]-->