多个< nav>标签 [英] multiple <nav> tags

查看:109
本文介绍了多个< nav>标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在html5的同一页面上使用多个标签吗?

Can we use multiple tags on the same page in html5?

我读过这篇关于Zeldman.com的文章,但对我来说并不完全清楚

I've read this article on Zeldman.com but it's not entirely clear to me

ie

<header><nav>links here</nav></header>

<footer><nav>links here</nav></footer>


推荐答案

是的,绝对的。您可以有多个标头 nav 页脚标签没有罚款。

Yes, absolutely. You can have multiple header, nav, and footer tags sans penalty.

只要你确定你在语义上使用标签并且你没有将它们放在无效的地方(它们是块级元素,所以你不能把它们放在一个内联元素中,例如)那么你不应该太担心粘贴者说的是什么。所有这一切都很容易陷入争论微小的细节而不是向前推进你的项目。

As long as you're making sure you are using tags semantically and you aren't putting them in invalid places (they're block-level elements, so you can't put them inside an inline element, for example) then you shouldn't worry too much about what the sticklers are saying. It's all to easy to get caught up arguing about tiny details instead of moving forward on your project.

这篇关于多个&lt; nav&gt;标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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