2012-10-19

How to make HTML5 work in old browsers

First of all, I need to tell that only the latest versions of browsers support HTML5. If the browser doesn't support HTML5 then you don't really have any choice. It's an internal thing of the browser. You cannot force it to load HTML5.

Being said that, there are some ‘tricks’ we can do to replace HTML5 features with alternatives. Modernizr is such a library which can detect the HTML5 and CSS3 capability of the browser. It does not make browser works for HTML5 or CSS3. You have to detect the features browser supports and write alternatives for the features it does not support. Modernizr is just a library  which tells you whether a particular feature is available in the browser or not.

With the use of html5shiv we can add basic support for HTML5 in IE. html5shiv is only working in IE and it only allow styling of HTML5. It will not recognize tags such as <audio>, <video>.

No comments: