Is it valid to have a
tag inside another
tag?

后端 未结 3 1653
南方客
南方客 2020-12-23 13:03

Are

tags allowed to be included within another
tag? Will it validate in HTML5?

相关标签:
3条回答
  • 2020-12-23 13:25

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

    You can try it out here.

    0 讨论(0)
  • 2020-12-23 13:30

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

    0 讨论(0)
  • 2020-12-23 13:31

    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.

    0 讨论(0)
提交回复
热议问题