Make HTML5 Elements Work in Old IE

So that the DOM (and thus CSS) recognizes them as real elements:

(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=""></script>

Reference URL


  1. User Avatar
    Permalink to comment#

    nice :)

  2. User Avatar
    Permalink to comment#

    Cool. :) Thanks

  3. User Avatar
    Permalink to comment#

    Is this script works for ie6?

  4. User Avatar
    Permalink to comment#

    This works great. thanks

  5. User Avatar
    Permalink to comment#


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


  6. User Avatar
    David Silva
    Permalink to comment#

    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 . . .

    • User Avatar
      Permalink to comment#

      You mean like this?

      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. User Avatar
    Permalink to comment#

    this should probably be updated to look something like this:

    &lt!--[if lt IE 9]&gt
     &ltscript src=""&gt&lt/script&gt
  8. User Avatar
    Permalink to comment#

    That is awesome!

  9. User Avatar
    Permalink to comment#

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

  10. User Avatar
    Zak Kates
    Permalink to comment#

    Which is more effective? This one from Google Code OR ?

    Modernizr is featured on the HTML5 Boilerplate instead of GoogleCode

  11. User Avatar
    Subash Pathak

    Hi chris,
    Can you tell me why there is a


    Comment inside if in the code ???

  12. User Avatar
    Permalink to comment#

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

  13. User Avatar
    Permalink to comment#

    This is really very need full.

  14. User Avatar
    Permalink to comment#

    Thnx its very usefull stuff

  15. User Avatar
    Permalink to comment#

    thats cool baby :D but pls stop using IE :|

  16. User Avatar
    Permalink to comment#

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

  17. User Avatar
    Permalink to comment#

    Hi man,
    I have used ext.js and is working for 7 an 8. But not working for 9 to 11. Please help me, if possible.

  18. User Avatar
    Vignesh Chandrasekaran
    Permalink to comment#


    The above code no longer works as the url path of js gives 404 error. Are you aware of what is the new path?

Posting Code

You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.

Code of Conduct

Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.

Want to tell us something privately?

Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.

Submit a Comment