An Engineers Notebook

HTML5 | Browser Compatibility

HTML5 is not recognised by some older browsers. To rectify this we can add some simple CSS to help it be understood. The follow CSS tells the browser to treat each of the elements as a ‘block level element’.

/*HTML5 Display Rule */
address, article, aside, canvas, content, details, figcaption, figure, footer, header, nav, menu, section, summary {
display: block;

 Next, we need to add the HTML5 Shim code. This is an IE enabling script. This goes right before the closing </head> tag.

<!--[if lt IE 9]>
    <script src="bower_components/html5shiv/dist/html5shiv.js"></script>


Leave a Reply

Your email address will not be published.