Does ie8 support html5?

藏色散人
Release: 2023-01-06 15:31:01
Original
2570 people have browsed it

ie8 does not support html5. If you want ie8 to support html5, there are two ways: 1. Reference Google's html5.js file and put the code in the head tag interval; 2. By adding "while (i --){document.createElement(e[i])}" code implementation supports HTML5 elements.

Does ie8 support html5?

#The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

Does ie8 support html5?

No.

But to make IE (ie6/ie7/ie8) support HTML5 elements, we can add the following JavaScript to the HTML header. This is a simple document.createElement statement, using conditional comments to call this js file for IE. . Opera, FireFox and other non-IE browsers will ignore this code and there will be no http request.

Method 1: Quote Google’s html5.js file. You can download the code content and read it yourself.

  
Copy after login

Put the above code into the head tag interval

Method 2: Do it by coding JS yourself.

Copy after login

No matter which of the above methods you use, please remember to define the following in CSS to make these tags become block elements, just like divs.

/*html5*/ article,aside,dialog,footer,header,section,footer,nav,figure,menu{display:block}
Copy after login

Recommended learning: "HTML5 Video Tutorial"

The above is the detailed content of Does ie8 support html5?. 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!