Is it valid to have a <section> tag inside another <section> tag?


Html Problem Overview

Are <section> tags allowed to be included within another <section> tag? Will it validate in HTML5?

Html Solutions

Solution 1 - Html

Yes! w3 encourages you to explicitly wrap sections in elements of sectioning content, instead of relying on the implicit sections generated by having multiple headings in one element of sectioning content and nested <section>'s are allowed.

Solution 2 - Html

Yes, since a website is generally divided into one or more sections, use it as long as you feel it describes the structure. A layout can have 1 or even tens of SECTION elements, just know that it is NOT a DIV replacement :) DIVs are still used and recommended (usually for grouping means).

Solution 3 - Html

Yes, that will work fine. At least, it works for me.

You can try it out">here</a>;.


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiontimofey.comView Question on Stackoverflow
Solution 1 - HtmlOlegView Answer on Stackoverflow
Solution 2 - HtmlSirCommyView Answer on Stackoverflow
Solution 3 - Htmljohn_scienceView Answer on Stackoverflow