Home >Web Front-end >HTML Tutorial >How to know whether the browser supports html5
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>
Using this method, you can detect whether the browser supports H5. Interested friends can try it.
Related reading:
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!