JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Dive Into HTML5</title>
  <script src="https://raw.github.com/Modernizr/Modernizr/master/modernizr.js"></script>
</head>
<body>
    text
</body>
</html>

JavaScript

//HTML5

//function supports_geolocation() {
//  return !!navigator.geolocation;
//}

//supports_geolocation();



if (Modernizr.canvas) {
  alert(" let's draw some shapes! ");
} else {
  alert(" no native canvas support available :(");
}
function supports_video() {
  return !!document.createElement('video').canPlayType;
}

if (supports_video()) {
  alert("supports_video!");
} else {
  alert(" no supports_video");
}


if (Modernizr.video) {
  // let's play some video!
    alert("let's play some video!");
} else {
    alert(" maybe check for QuickTime or Flash instead");
    
}
alert(Modernizr.video.ogg);
if (Modernizr.video) {
  // let's play some video! but what kind?
  if (Modernizr.video.webm) {
    // try WebM
      alert("webm");
  }
  if (Modernizr.video.ogg) {
    // try Ogg Theora + Vorbis in an Ogg container
      alert("ogg");
  } 
  if (Modernizr.video.h264){
    // try H.264 video + AAC audio in an MP4 container
      alert("h264");
  }
}