When to use the HTML5 SECTION element and when to use ARTICLE, ASIDE, and DIV

The new HTML5 SECTION element can be somewhat confusing. If you’ve been building HTML documents before HTML5, chances are you are already using the DIV element to create structural divisions within your pages and then style the pages with them. So it might seem like a natural thing to simply replace your existing DIV elements with SECTION elements. But this is technically incorrect. So if you don’t just replace DIV elements with SECTION elements, how do you use them correctly?


When Not to Use the SECTION Element

Beyond the advice above to use the more specific semantic elements first, there is one definite area that you should not use the SECTION element: for style only.

In other words, if the only reason you’re putting an element in that place is to attach CSS style properties, you should not use a SECTION element. Find a semantic element or use the DIV element instead.