Grow your CSS skills. Land your dream job.

Last updated on:

Make HTML5 Elements Work in Old IE

(function(){if(!/*@cc_on!@*/0)return;var e = "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})()

Hotlink Script:

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

Reference URL

Comments

  1. Permalink to comment#

    nice :)

  2. Cool. :) Thanks

  3. Permalink to comment#

    Is this script works for ie6?

  4. Rico
    Permalink to comment#

    This works great. thanks

  5. Varsh
    Permalink to comment#

    Hi,

    I am getting error while I am trying – createLinearGradient.. Can you please help on this.

    Varsh..

  6. How is it that IE hasn’t disappeared yet? When will Microsoft realize that its browser cannot catch up. Put it out of its misery – it’s aging horribly and dying . . .

    • Permalink to comment#

      You mean like this?

      http://www.ie6countdown.com/

      Microsoft knows full and well that IE6 is way outdated. Users / Businesses either don’t know enough, don’t care enough, or invested too much time and money to upgrade regularly or at all.

  7. Permalink to comment#

    this should probably be updated to look something like this:

    &lt!--[if lt IE 9]&gt
     &ltscript src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt&lt/script&gt
      &lt![endif]--&gt
  8. That is awesome!
    Thanks

  9. Diego
    Permalink to comment#

    Should I use this script to IE less and equal than 8? Works for 5.5, 6 and 7?

  10. Which is more effective? This one from Google Code OR http://modernizr.com/ ?

    Modernizr is featured on the HTML5 Boilerplate instead of GoogleCode

  11. Subash Pathak

    Hi chris,
    Can you tell me why there is a


    /*@cc_on!@*/

    Comment inside if in the code ???

  12. What IE versions does it work for? 9? 8? 7? 6? 5?

  13. Jangyadatta
    Permalink to comment#

    This is really very need full.

  14. mubin
    Permalink to comment#

    Thnx its very usefull stuff

  15. thats cool baby :D but pls stop using IE :|
    thanks.

  16. Brahm
    Permalink to comment#

    Is there a website(or cheatsheet) containing a list of all elements html5/css3 supported by ie8+?

Leave a Comment

Posting Code

Markdown is supported in the comment area, so you can write inline code in backticks like `this` or multiline blocks of code in in triple backtick fences like ```this```. You don't need to escape code in backticks, Markdown does that for you.

Sadly, it's kind of broken. WordPress only accepts a subset of HTML in comments, which makes sense, because certainly some HTML can't be allowed, like <script> tags. But this stripping happens before the comment is processed by Markdown (via Jetpack). It seems to me that would be reversed, because after Markdown processes code in backticks, it's escaped, thus safe. If you think you can fix this issue, get in touch!

If you need to make sure the code (typically HTML) you post absolutely posts correctly, escape it and put it within <pre><code> tags.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".