本文介绍了标题标记是否可以包含多个导航标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,我在网页顶部有一个网络导航菜单,其中包含通过网络的网站的链接,我的主要导航包含导航到该网站。这两个导航项都可以在html5中的相同标题标记中吗?所以我会有类似于 < header>
< nav id =nav_network>< / nav>
徽标和内容
< nav id =nav_site>< / nav>
< / header>
这是否有效?
解决方案
验证器无损:
(只要您包含头部
和a中的 title
)
通常情况下,您可以将 nav
在标题外
。
标题
更像是标题,标志和搜索表单。
更多信息:
for example, I have a network nav menu at the top of the page which contains links to sites across the network and my main nav contains navigation to this site. Can both of these nav items be in the same header tag in html5? So I would have something like
<header>
<nav id="nav_network"></nav>
logo and stuff
<nav id="nav_site"></nav>
</header>
Is this valid?
解决方案
This is fine by the validator:
(As long as you include a head
and a title
in the doc)
Usually, though, you would place the nav
outside the header
.
Header
is more like the title, logo, and a search form.
http://dev.w3.org/html5/spec/Overview.html#the-header-element
More here: http://html5doctor.com/the-header-element/
这篇关于标题标记是否可以包含多个导航标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!