HTML5 commonly used structural elements and support for older browsers

HTML5 commonly used Structural Elements for website development and web application development.


<section>
<article>
<aside>
<header>
<footer>
<nav>
<figure>
<figcaption>
<time>
<mark>
<main>
<details>
<progress>


All the above HTML5 elements are not supported in older browsers.

You can make the all new elements support for older browsers specially Internet Explorer (IE 8 and below). You can use one of the methods to recognize these new elements as per your requirement.

1. document.createElement("section")

In the above method just you can add one line of code in head Section (between<script></script>).This method can be best if you are not using all HTML5 elements. By using this method you can reduce load time of html5shiv.js library. 

2. //cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.js

In above method load the above CDN URL with a conditional comment to head section. 

3.  Modernizr- The feature detection library for HTML5 and CSS3

In the above method you can use the Modernizr JavaScript library which detects
HTML5 and CSS3 features in the user's browser.

You can download modernizr JavaScript library as per your requirement. 

For more details you can go through:
http://modernizr.com/

Happy learning

Cheeers!


Comments

Popular posts from this blog

Emmet the Ultra Fast toolkit for web-developers to code HTML,CSS