Home > Web Front-end > HTML Tutorial > How to know whether the browser supports html5

How to know whether the browser supports html5

php中世界最好的语言
Release: 2017-11-22 17:32:43
Original
7115 people have browsed it

With the promotion of HTML5 technology, almost all developers around the world are now using H5 to build their own websites, but this has come up with a big drawback. Some old versions of browsers It does not support h5, so how do we distinguish which ones are supported and which ones are not? Today I will share with you a method.

Browsers that support html5;

(1) Chrome, Firefox: Support html5 for many years, and have automatic upgrades, the best support.

(2) Safari, Opera: They have also supported html5 for many years, and the support is also very good.

(3) IE: IE10 or above

Browsers that do not support html5:

IE10 or below does not support it

How to detect whether the browser supports html5 ?

<!--检测浏览器是否支持html5-->
<!DOCTYPE html>
<html>
<head>
       <meta charset="UTF-8">
       <title>检测浏览器是否支持html5</title>
</head>
<body style="font-size: 13px">
<canvas id="myCanvas" width="200" height="100" style="border: 2px solid #ccc; background-color: #eee">
       该浏览器不支持html5的画布标记
</canvas>
      
</body>
</html>
Copy after login

Using this method, you can detect whether the browser supports H5. Interested friends can try it.

Related reading:

How to use the table tag in HTML


css web page border How to view the source code of the webpage with code


html

The above is the detailed content of How to know whether the browser supports 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template