Computer >> Computer tutorials >  >> Programming >> HTML

HTML5 semantic elements and which old browsers does it support?


Internet Explorer 8 and older versions does not support semantic elements like nav, header and article. To style semantic elements, Modernizer is used. Some CSS can be added to block CSS by default.

article, header, nav, section, footer
{
   display:block;
}

We can also create our own elements through JavaScript by writing following code −

<script>
   document.createElement('nav'); //nav is semantic element
   document.createElement('header'); //header is semantic element
   document.createElement('article'); //article is semantic element
</script>