HTML5 Modernizr Usage


Modernizr is a small JavaScript Library that detects the availability of native implementations for next-generation web technologies.

Modernizr provides an easy way to detect any new feature so that you can take the corresponding action. For example, if a browser does not support video feature then you would like to display a simple page.

Before you start using Modernizr, you would have to include its javascript library in your HTML page header as follows:

<script src = "modernizr.min.js"></script>

As mentioned above, you can create CSS rules based on the feature availability and these rules would apply automatically on the webpage if browser does not support a new featur

Updated on: 28-Jan-2020

88 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements