What is the difference is usage between <nav> and <menu> in html5?
What is the difference is usage between nav and menu in html5?
nav or menu, which one?
Straight from the horse's mouth:
http://dev.w3.org/html5/spec-author-view/interactive-elements.html#menus
The menu element represents a list of commands.
E.g.:
<menu label="File"> <button type="button" onclick="fnew()">New...</button> <button type="button" onclick="fopen()">Open...</button> <button type="button" onclick="fsave()">Save</button> <button type="button" onclick="fsaveas()">Save as...</button> </menu>
http://dev.w3.org/html5/spec-author-view/sections.html#the-nav-element
The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links.
<nav>
is a general section of the site layout that holds navigation content
<menu>
is a list of commands within the navigation or any other layout section
精彩评论