HTML5 to be sure

Internet Explorer 9 has been released for Windows Vista or 7. Apparently it supports more features of HTML5 and CSS3, but what about earlier version of IE and HTML5?

What do we need to do to our markup to be sure that IE7 and 8 will 'degrade' gracefully' or even deliver some elements and styles correctly?

furthermore...

New Elements for HTML5

There are many new elements introduced by HTML5 and we need to 'encourage' Internet Explorer to recognise these as block level elements. We do this by adding some rules to our CSS:

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section,time { display:block;}

New Functions in HTML5

There are new aspects in HTML5 and CSS3 such as canvas, multimedia, transparency etc. To test if these features work in the browser (and then provide fallback modes), you can utilise a fantastic javascript library called modernizer - read about it and get it here.

Once you have this library available then you can add to the head of your pages with IE conditional comments. Just view the source of this page to see what I mean.

Adding Functions to earlier versions of Internet Explorer

There are javascripts available that will add features to the browser, and thus change their behaviour. The one that I use here is PIE, but here is a comprehensive listing of these, so-called polyfills.

Posted on 03 May around 8am

Tags: