Now HTML5 more and more attention, but currently support HTML5 browser is not mainstream, especially domestic users nearly 50% still use IE6, because support HTML5 IE9 does not support the installation of XP system, so the future for a long time, HTML5 developers will have to consider backwards compatibility issues. There are many ways to HTML5 tag or CSS selector compatibility, in which a self-generated tag element is one.
The basic principle is that the following code works in IE8, and the style does not work at all.
<style>mxria{color:red;} </style>
<body>
<mxria>Hello!</mxria>
</body>
In order to be a browser identification <mxria></mxria> tags and display the corresponding style of effect, we can add a section of JS, see the effect is different
<style> mxria{color:red;} </style>
<script>document.createelement ("Mxria") </script>
<body>
<mxria>Hello!mxria.com</mxria>
</body>
Now everyone understands the mystery of it! Yes, that is document.createelement, HTML5 Shiv is such a JS plugin, all HTML5 tags are regenerated, you need to load the plug-in, then the HTML5 program can be recognized by all browsers.
: Http://html5shim.googlecode.com/svn/trunk/html5.js
Enable all browsers to recognize HTML5 tag-style widgets