Js determines whether the browser supports html5


Method a,

<script>
function checkhHtml5() {
if (typeof(Worker) !== "undefined") {  alert(" support HTML5");  }  else {  alert(" Does not support HTML5");  } }
</script>

Method 2,

<canvas id="Canvas" ></canvas>

<script>  if (!document.getElementById("Canvas").getContext) {   alert(" Does not support html5");  }  else{ alert(" support html5"); } </script>

Method 3:

<script>
window.onload = function() {
  if (!window.applicationCache) {
    alert(" Your browser does not support it HTML5 ! ");
  }
}
</script>