Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

html

People also ask

Can you put a section inside a section?

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 I use section tag inside div?

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).

Can we have section inside article in HTML?

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.