HTML5 compatibility in IE

Source: Internet
Author: User
Since HTML5 can make our new web pages more efficient and clean CodeHowever, the only way that IE can recognize those new elements (such as <Article>) is to use HTML5 Shiv, thanks to Remy sharp for providing us with this mini script to solve the problem that IE supports HTML5.

Use and download
Html5.js must be called within the page head element (because IE must know this element before parsing the element, this JS file cannot be called at the bottom of the page .)
The author has put JS files on the Google Code project and allowed them to be called directly. Of course, the premise is that you do not care about calling additional files.
Http://html5shiv.googlecode.com/svn/trunk/html5.js
You can use IE condition annotations to call this JS file, so that non-ie browsers such as Firefox will ignore this code and there will be no unnecessary HTTP requests. The following code will only run in IE:

Copy the Code as follows:

<! -- [If IE]>
<SCRIPT src = "http://html5shiv.googlecode.com/svn/trunk/html5.js"> </SCRIPT>
<! [Endif] -->

Of course, if you do not like to call an Internet file, you can download it and upload it to your server for separate calling (allowed by the author ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.