The <menu> tag is supported in all major modern browsers.
The <nav> tag is one of the HTML5 elements. It is used to specify a block of navigation links, either within the current document or to other documents. Examples of navigation blocks are tables of contents, menus, and indexes.
<menu> Tag: The <menu> tag in HTML is used for creating menu lists. It defines a list of commands which can be used by the users to create listing form control, toolbar, context menus, and commands. The <menu> tag was removed from HTML and reintroduced in HTML5.
Usage notes<nav> is intended only for major block of navigation links; typically the <footer> element often has a list of links that don't need to be in a <nav> element. A document may have several <nav> elements, for example, one for site navigation and one for intra-page navigation.
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.
Here's an HTML5Doctor post on nav
with a section on how it's different from menu
(basically, use it in actual apps). Looks like you want nav
.
With the <menu>
it's usually used for context menus.
MDN has good documentation on it: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu
The best place to get this answer is the HTML 5 standards them self.
Menu is defined in HTML 5.1 2nd Edition.
It, "... represents a group of commands."
Nav is defined in HTML 5.
It is, "... a section of a page that links to other pages or to parts within the page: a section with navigation links."
There are notes for nav that I didn't include but think are important, but I think its best for you to get the definition yourself from the standards.
The definitions marked in this post as the answer are close to correct but have extraneous statements in them that make the answer itself wrong.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With