I want to create a set of content tabs for a design I'm building in HTML5. I'm wondering if I should use a set of <article>
or <section>
tags to contain the content?
<section>
seems ideal to me. Its definition applies quite neatly to something like content tabs:
The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content, typically with a heading.
Examples of sections would be chapters, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site's home page could be split into sections for an introduction, news items, and contact information.
Take note of what it says about <article>
on that same page though:
Authors are encouraged to use the article element instead of the section element when it would make sense to syndicate the contents of the element.
So if the content of your tabs is self-contained and makes sense when read in isolation (and could be used that way), use <article>
, if it doesn't use <section>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With