html5:使用页眉或页脚标签两次? [英] html5: using header or footer tag twice?

查看:263
本文介绍了html5:使用页眉或页脚标签两次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

quick question:它实际上是否允许使用标头标签两次?例如我在header.php中有两个重要的头部分,两个头部都可以有标签?解析方案

是的,但是有一个catch 。 W3文档声明标签代表最近的祖先部分的页眉和页脚区域。我会建议尽可能多的按你的要求,但是每个页面的每一个部分,例如正文,部分等,每一个部分只有一个。

From W3 b
$ b


标题元素通常包含该部分的标题(h1-h6元素或hgroup元素),但这不是必需的。 header元素也可以用来包装一个section的内容表,一个搜索表单或者任何相关的logo。

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


页脚元素表示页脚为其最近的祖先切片内容或切片根元素。页脚通常包含有关其部分的信息,例如谁写的,相关文档的链接,版权数据等。

是指向其各自标准文档的链接:标题页脚


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?

解决方案

Yes, but with a catch. The W3 documents state that the tags represent the header and footer areas of their nearest ancestor section. I would recommend having as many as your want, but only 1 of each for each "section" of your page, i.e. body, section etc.

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

Here are links to their respective standard documentation: header and footer

这篇关于html5:使用页眉或页脚标签两次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆