Code Responsible

Skip navigation

How to use HTML5 elements with legacy browsers

html5andie

HTML5 offers a lot new semantic and structural elements to our coding palet. Some of these elements include: header, footer, nav, aside, article, and section. These new elements offer a lot of great benefits like: accessibility, video and audio support, mobile support, storage, cleaner markup and many more. As developers we should be putting them to use, the only problem is older versions of Internet Explorer don’t support these elements. This shouldn’t prevent us from using the new standard. Too often the legacy browsers prevent us from using new technologies.

Instead of avoiding the use of HTML5 elements because they won’t work in older versions of IE, we can simply add an HTML5 JavaScript Shiv that will force IE to support these elements. By simply adding the code before the closing head tag IE will now run the HTML5 elements you’re using throughout your website.

Download HTML5.js

<!--[if IE]>
 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

41 Posts

Ryan Burgess

Ryan Burgess is a Manager, UI Engineering at Netflix in San Francisco, California. Previously at Evernote. Listen to Ryan on the Front End Happy Hour podcast. He's also the creator of SensesLost.com, an online-based arts and culture magazine that focuses on graffiti and tattoo art.

Leave a Reply

Comment Form