Are <section>
tags allowed to be included within another <section>
tag? Will it validate in HTML5?
-
12Ask validator.w3.org– BoltClockMar 28, 2012 at 22:10
-
I don't understand the explanations given here but validator.w3.org validates nested sections– xtianOct 4, 2022 at 11:11
3 Answers
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.
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).
-
6This seems to address sibling sections. I don't see how it answers the question about nested sections.– ANevesOct 22, 2018 at 20:54