Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser. Modernizr makes it easy for you to write conditional JavaScript and CSS to handle each situation, whether a browser supports a feature or not.Taking advantage of cool new web technologies is great fun, until you have to support browsers that lag behind.It’s perfect for doing progressive enhancement easily.
Modernizr runs quickly on page load to detect features; it then creates a JavaScript object with the results, and adds classes to the html element for you to key your CSS on. Here is a nice article on Taking Advantage of HTML5 and CSS3 with Modernizr.
Please keep in mind, that Modernizr doesn’t actually magically enable these properties for browsers that don’t support them. It just tells the page whether that feature is supported on the browser the visitor is using or not.
You can download this javascript library from here.
To implement modernizr,
First step: include the library
script src="js/modernizr-1.0.min.js"
Second Step: include on your html tag a class of "no-js" (Not mandatory)
html class="no-js">