To install Modernizr, download the file from this page. Then, on your siteโs head tag, add a link to the file. For example:
?1<script src="js/modernizr-1.0.min.js"></script>
The second step is to include on your html tag a class of โno-jsโ:
?1<html class="no-js">
Why add this tag?
Because that will be the default state of the page. If JavaScript (js) isnโt on, then Modernizr wonโt work at all (and probably other features of your site wonโt work eitherโฆ), so itโs good that we have a fallback for that case.
If JavaScript is indeed enabled, once that page is loaded on the browser, that class will be replaced dynamically and it may look something like this:
?1<html class="js canvas canvastext geolocation rgba hsla no-multiplebgs borderimage borderradius boxshadow opacity no-cssanimations csscolumns no-cssgradients no-cssreflections csstransforms no-csstransforms3d no-csstransitions video audio cufon-active fontface cufon-ready">