header/footer/nav tags – what happens to these in IE7, IE8 and browsers than don’t support HTML5?

Place this is the <head> section of your page, before any CSS files are loaded.

<!--[if lte IE 8]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>

html5shi(m|v) creates doc elements for all the html5 elements so the styles from your CSS can kick in. Default behaviour for IE is to ignore unknown elements. For more info see resig’s blog post.

Leave a Comment