Let's start by using the open source Modernizr project at: http://modernizr.com created by developers Faruk Ates and Paul Irish. According to the website, Modernizr uses feature detection to test the current browser against upcoming features.
Note
The Modernizr concept aims at feature detection instead of browser detection. It is a subtle but important differentiation. Instead of making broad assumptions, the Modernizr approach detects features that browsers support.
Download the Modernizr JavaScript file and reference it in the head
section of your markup. You will then add the class of "no-js" to your body
element, like this:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"> </script>[endif]--> <script src="modernizr-1.6.min.js"></script> </head> <body class...