Sectioning elements can be nested inside one another as many times as is needed based on the content. The header and footer in a sectioning element can also contain sectioning elements.
Can one use div inside the section block like below? Yes you can use a div inside a section . we use section when we want separate elements (this same category or similar). First tag inside section should be header (h).
Every component of the HTML is allowed.
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).
Yes, that will work fine. At least, it works for me.
You can try it out here.
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