Let ie Support the implementation of html5 labels, iehtml5

Source: Internet
Author: User

Let ie Support the implementation of html5 labels, iehtml5

Html5 has been popular for a long time. If you don't study html5 + css3, you can't go over it. Let's start with the most basic introduction today, so that the older generation of the ie family can understand the new html5 labels. Frontend Resource Sharing

1. Add code to the page

. Code
  1. <! -- [If lt IE 9]>
  2. <Script src = "http://html5shim.googlecode.com/svn/trunk/html5.js"> </script>
  3. <! [Endif] -->

 

2. Define the CSS code (Important)

. Code
  1. Article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display: block ;}

 

The original content of this js file is very small, and the amount of version code updated may increase now. I did not elaborate on the specific differences and posted the original code. It should still be usable. Frontend Resource Sharing

. Code
  1. (Function () {if (! /* @ Cc_on! @ */0) return; var e = "abbr, article, aside, audio, canvas, 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]) }}) ()

 

If you want. You can directly put it in the page. However, pay attention to the second step. Define the display: block attribute for the html5 tag.


How is HTML5 browser compatibility? Suitable for website development?

At present, most websites have gradually tried to use HTML5 for reconstruction, but most of them are still using new HTML5 semantic tags. For earlier ie browsers, it is easy to be compatible with new HTML5 labels.
The new attributes of HTML5 are usually used in the new attributes + js compatibility method.
There are almost no large websites in China for special new functional tags, such as video, audio, and canvas.
Most mobile terminals are webkit kernels, so you can safely use HTML5.
In China, it will take at least five years for you to use HTML5 when modern browsers become popular. IE6 will be extinct in about one year, and IE8 will not become extinct in a short time.
We recommend that you consider HTML5 + compatibility assistance, so that modern browsers can display cool effects. The old browsers can ensure normal business, not necessarily the same as the HTML5 version, as long as the most basic skills are available.

How to make the browser support HTML5

We cannot allow browsers to support html5.
Only html5-supported browser versions can be downloaded.
Including the latest version of browsers
Chrome firefox safari ......
Some browsers are trying to support html5, such
Travel 3 opera

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.