html5:使用标头或页脚标签两次?

前端之家收集整理的这篇文章主要介绍了html5:使用标头或页脚标签两次?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
快速问题:它实际上是否允许使用标头标签两次?例如我有两个重要的头部在我的header.PHP哪里都可以有标头标签

解决方法

是的,但有一个catch。 W3文档声明标签表示它们最近的祖先段的标题和页脚区域。我会建议您尽可能多的你想要的,但每个“部分”,你的页面,即身体,部分等每个只有1。

从W3

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.

=======================

The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it,links to related documents,copyright data,and the like.

这里是他们各自的标准文档的链接headerfooter

猜你在找的HTML5相关文章