How to make IE browser support html5 tag?

零下一度
Release: 2017-04-25 13:47:29
Original
1973 people have browsed it

Html5 has been popular for a long time. It is really difficult not to study html5+css3. Today, let’s start with the most basic introduction, so that the old people of the IE family can understand the new tags of html5.

1. Add the code to the page

  1. Copy after login

2. Define the CSS code ( Important)

.CodeHow to make IE browser support html5 tag?

  1. article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {display:block;}
    Copy after login

The original content of this js file is very small, and it may be updated now The version code size has increased. I didn't go into the specific differences and posted the original code. It should still be usable.

.CodeHow to make IE browser support html5 tag?

  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])}})()
    Copy after login

If you want it, take it to your friends. Can be placed directly on the page. But pay attention to the second step, define the display:block attribute for the html5 tag.

The above is the detailed content of How to make IE browser support html5 tag?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!