Techie Tip of the Week: Making HTML5 Tags Work in Internet Explorer

20120825-081442.jpg 20120825-080835.jpg


Internet Explorer 8 (and earlier) doesn’t understand the new HTML5 elements.

To use the HTML5 elements and have them work properly in IE, you need to “teach” IE to use them by writing a JavaScript that creates the new elements used in HTML5:

<script>
document.createElement("article");
document.createElement("section");
document.createElement("nav");
document.createElement("header");
document.createElement("footer");
</script>

If we put these JavaScript commands at the top of our web page, we can now use the ARTICLE, SECTION, NAV, HEADER, and FOOTER elements and know that IE will render them appropriately.

Tags: , , ,

Leave a Reply

You must be logged in to post a comment.