< NAV>或< menu> (HTML5) [英] <nav> or <menu> (HTML5)
问题描述
< menu>
。 / p> 那么,我应该在我的主菜单中使用哪一个? Nav
或菜单
?这是否重要?
a
元素)。通常这意味着链接应该到达单独的页面,或者在AJAX页面的情况下更改内容。点击 nav
项目时,预计会发生某些内容更改。
W3Schools.com and I'm pretty sure I remember seeing W3C.org state that So, which one should I use for my main menu? 这篇关于< NAV>或< menu> (HTML5)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!菜单
用于控件组(
a
,输入
,按钮
)。通常这意味着输入应该在页面内执行一个功能。当点击一个菜单
项目时,预计会出现某种类型的javascript交互。 $ b nav code $:导航。
菜单
: 菜单。<menu>
should be used for Toolbar menus and listing form control commands.Nav
, or Menu
? Does it matter?nav
is used for groups of internal links (a
elements). Generally this means the links should travel to separate pages, or change content in the case of an AJAX page. Expect some sort of content change when clicking on a nav
item.menu
is used for groups of controls (a
, input
, button
). Generally this means the inputs should perform a function within the page. Expect some sort of javascript interaction when clicking on a menu
item.nav
: the navigation for the site.menu
: the menu for a web application.