I want to know if it would be ok to have a section tag contain no heading tags inside of it. I have looked at couple of examples and they all have heading tags inside of them.
The structure I implement for my section tag at the moment is:
<section>
<article>
<div>
</div>
</article>
<article>
<div>
</div>
</article>
</section>
HTML5 does not require the use of headers within an article element however it can be useful if you want to publish additional details such as date of publishing as well as you could include a nice footer to each article as well.
This would be useful:
By using the above code you can style the site without making hardly any addition classes due to the fact the main header and footer of your site won’t be contained within a section, or least I hope you don’t have it.
So styling article footers and headers and everything else in their is possible without making addtional classes which is very code freindly for example
Notice how with the above code there is no need for classes to be made, its pretty awesome and very flexible.
This would not be useful:
The instructions on using HTML5 is very vague and many people agru if header should even be used at all within an Article but headers are useful if you have a lot of content to stick in their such as publish date, author, more than one H1, and H2 etc.
Footers in articles I find more useful but generally if I’m using the footers I use the headers as well, generally you should always code with as little code as possible and you should always consider Googles snippets as an alternative over some HTML5’s if you want the benefit from those.
You should factor in what is easiest to style your site, using header can be easier to use without making additional classes for example.