In what manner you use HTML5 tags, which is better way, and why? [closed]

Challang3r

New Member
It's not a question actually, I'm looking for opinions from professionals. While, I look into the sources of professionally developed Templates/Wordpress Themes/Blogs, I noticed a quite variations in usage of few tags like \[code\]<header>, <footer>, <nav>, <aside>, <section>, <article>\[/code\].eg. Which one is proper way to use header tag in between these two snippets?Snippet 1)\[code\]<div class="header"> <header> <div class="logo"> <!-- logo here --> </div> <div class="headerad"> <!-- header ad --> </div> </header></div>\[/code\]Snippet 2)\[code\]<header> <div class="logo"> <!-- logo here --> </div> <div class="headerad"> <!-- header ad --> </div></header>\[/code\]Theoretically, The snippet 2 is correct. But, Is there any special reason why some developers enclose header and footer tags into a div or is it a personal preference? Another question, By default, \[code\]<nav>\[/code\] tag stacks \[code\]<a>\[/code\] anchors tags as inline-block, Will it be a good practice if I use following snippet for horizontal menus without dropdowns? What could be the fallbacks?\[code\]<nav> <a href="http://stackoverflow.com/questions/15748663/#">Link 1</a> <a href="http://stackoverflow.com/questions/15748663/#">Link 2</a> <a href="http://stackoverflow.com/questions/15748663/#">Link 3</a> <a href="http://stackoverflow.com/questions/15748663/#">Link 4</a> <a href="http://stackoverflow.com/questions/15748663/#">Link 5</a></nav>\[/code\]Last question, Suppose my sidebar uses three div's stacked vertically, Can I completely replace those div's with section elements?I've read articles on html5doctor.com that clears most of my doubts, Here I'm looking for your opinions and how exactly you implement these few elements. A couple of html structure snippets will be a great help.
 
Back
Top