I recently wrote a post about HTML 5 and whether it was ready to use -- surmising that it certainly was and that we in fact built our new site using HTML 5 and associated technologies. When using the latest development techniques you still have to take into account older browsers, making sure that your code works in an acceptable manner for all of your target audience.
There are two common practices when trying to achieve this: graceful degradation and progressive enhancement:-
Graceful degradation is the older of the two approaches with the term also being used in fields other than just web design such as fault tolerant mechanical and electrical systems.
The idea behind graceful degradation is to first build for the latest device technologies, then adding handlers for less capable devices. The service offered is therefore gracefully degraded for the minority of lesser capable devices.
A simple example of graceful degradation is the use of the
<noscript> will be displayed.
It's important to ensure your site reaches the largest audience possible (not least to comply with accessibility guidelines) thus having to cater for all the common browsers and devices. Front-end/interface developers have always had this problem to a lesser or greater degree and usually adopt one or both of the techniques outlined above. This problem, however, is now compounded by the new features of HTML 5 and CSS3.
Previously developers relied on browser sniffing/detection to help them here. By detecting what browser your visitor is using you can present code that works in that browser. The problems with this technique are primarily that a) it is not very reliable; and b) it generally means writing one piece of code for one browser and another piece of code the other. A new approach being adopted is feature detection - this involved detecting whether a browser is capable of implementing the desired feature, rather than detecting the browser version.
When embedded in your page Modernizr detects whether the visitor's browser supports new HTML 5 features such as
localStorage along with the new input element and attribute types, as well as detecting support for CSS 3 features such as
Modernizr) that contains the results of these tests as boolean properties. It also adds CSS class names to the
<html> element to help you with targeting specific feature compliant browsers.
So, for all you developers out there wondering whether HTML 5 is ready to use yet, I say to you...
Go forth and Modernize!