All geek questions in one place
Benefits of HTML5 Tags
I have this simple layout in HTML:
<body> <div id="header"> <div id="nav"></div> </div> <div id="wrapper"> <div id="main"></div> <div id="sidebar"></div> </div> <div id="footer"></div> </body> I translated it into HTML5:
<body> <header> <nav></nav> </header> <div id="wrapper"> <section></section> <aside></aside> </div> <footer></footer> </body> Is it correct?
And what are the benefits of using HTML5 tags (header, section, aside, footer) instead of old divs?
+6
3 answers
All about semantics.
a <div> has no semantic meaning. <footer> does.
You can read more about this here: http://diveintohtml5.ep.io/semantics.html#new-elements
+4