html5: using header or footer tag twice?

后端 未结 6 694
情歌与酒
情歌与酒 2020-12-24 10:06

quick question: is it actually allowed to use the header tag twice? e.g. i have two important head-sections in my header.php where both could have header tag?

6条回答
  •  有刺的猬
    2020-12-24 10:48

    Yes you can use multiple header elements in your documents, by virtue of the w3c documentation:

    A header element is intended to usually contain the section's heading (an h1–h6 element or an hgroup element), but this is not required. The header element can also be used to wrap a section's table of contents, a search form, or any relevant logos.

    However ensure that it is semantically correct.

提交回复
热议问题