It is semantically correct to use
inside
?

后端 未结 2 422
长情又很酷
长情又很酷 2021-01-12 16:27

All examples I found on internet refers to using

inside
, but nothing related to the use of
e

相关标签:
2条回答
  • 2021-01-12 17:01

    Yes it is semantically correct to use header inside section

    header – There is a crucial difference between the header element and the general accepted usage of header (or masthead). There’s usually only one header or ‘masthead’ in a page. In HTML5 you can have as many as you want. The spec defines it as “a group of introductory or navigational aids”. You can use a header in any section on your site. In fact, you probably should use a header within most of your sections. The spec describes the section element as “a thematic grouping of content, typically with a heading.”

    Source

    You can also check header W3 specs here

    0 讨论(0)
  • 2021-01-12 17:15

    header is:

    introductory content for its nearest ancestor sectioning content or sectioning root element.

    section is a valid sectioning content, so header is semantically correct - even encouraged - in this position.

    Quote taken from this HTML5 Doctor page, which actually quotes the HTML5 spec directly.

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