The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other [WordPress] HTML5 theme structure Re: [WordPress] HTML5 theme structure


Hmm, here is my opinion: Try to use a section element to group related content. A good way to measure this is if the section would naturally have its own title. If a section doesn’t require a title, then you are probably doing it wrong.

In regards to the markup you have above, that is perfect. There is no need for a section there; article makes much more sense as it is a blog post. That being said, if you wanted to show your five latest posts then you could wrap those articles in a section element and give it a title (i.e. Latest Posts).

If you need to wrap stuff just for styling, use a div. A div doesn’t have semantic meaning like a section element.

I hope that makes sense.