I've begun to use html tags on my pages, and I'm trying to determine what is the proper usage of the NAV tag. I've read the documentation, and it seems like I should be okay with what I have, but I noticed that most other developers have their navigation 'blocks' within "ul" "li" tags. I've using divs.
My question is, what are the pros / cons to using "ul" "li" tags rather than divs?
目的不是用于导航,那么我怀疑你会对它有任何批评。 Well you could argue that not including html5 tags increases the readability of your html file. However, for SEO pu
...
nav用于内部链接( a元素)组。 通常这意味着链接应该移动到单独的页面,或者在AJAX页面的情况下更改内容。 点击nav项目时,可能会改变某种内容。 menu用于控件组( a , input , button )。 通常这意味着输入应该在页面内执行一个功能。 当点击menu项时,期待某种JavaScript交互。 nav :该网站的导航 。 menu :Web应用程序的菜单 。 nav is used for groups of internal links (a elements). Gene
...
您可以自己确定主要导航链接是什么。 你必须这样看:你的主要导航链接是对使用你网站的人很重要的链接,当然包括你自己。 因此,如果您认为在导航器上某处有快速登录链接会很好,那么是,登录应该在您的导航中。 没有人会检查你的导航是否正确,没有人会责怪你在你的导航中添加登录链接。 You can determine all by yourself what a major nav link is. You have to see it like this: Your Major Navigation lin
没有垫片,IE7将无法识别导航标签(或其他仅支持html5的元素)。 我知道的最流行的解决方案是html5shiv: https://github.com/aFarkas/html5shiv 如果您想了解更多相关信息,可以在此处执行此操作: http://paulirish.com/2011/the-history-of-the-html5-shiv/ IE7 won't recognize the nav tag (or other html5-only elements) without a
...
您发布的代码不是最佳做法。 它应该是:
和
标签比使用div标签更好,几乎总是用于菜单。 通过使用ul s和li s,您不会因为WAY太多ID而阻塞您的代码。 The code you posted isn't a be