标题标记是否可以包含多个导航标记? [英] Can the header tag contain more than 1 nav tag?

查看:165
本文介绍了标题标记是否可以包含多个导航标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我在网页顶部有一个网络导航菜单,其中包含通过网络的网站的链接,我的主要导航包含导航到该网站。这两个导航项都可以在html5中的相同标题标记中吗?所以我会有类似于

 < header> 
< nav id =nav_network>< / nav>
徽标和内容
< nav id =nav_site>< / nav>
< / header>

这是否有效?

解决方案

验证器无损:

http://validator.w3.org/check



(只要您包含头部和a中的 title

通常情况下,您可以将 nav 标题外



标题更像是标题,标志和搜索表单。


标题元素通常包含该部分的标题
(h1-h6元素或hgroup元素),但这不是必需的。
标题元素也可以用来包装部分的目录,
a搜索表单或任何相关的标志。

http://dev.w3.org/html5 /spec/Overview.html#the-header-element



更多信息: http://html5doctor.com/the-header-element/


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:

http://validator.w3.org/check

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

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.

http://dev.w3.org/html5/spec/Overview.html#the-header-element

More here: http://html5doctor.com/the-header-element/

这篇关于标题标记是否可以包含多个导航标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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