108

W3Schools.com and I'm pretty sure I remember seeing W3C.org state that <menu> should be used for Toolbar menus and listing form control commands.

So, which one should I use for my main menu? Nav, or Menu? Does it matter?

Slipp D. Thompson
  • 33,165
  • 3
  • 43
  • 43

5 Answers5

169

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.

zzzzBov
  • 174,988
  • 54
  • 320
  • 367
  • 8
    Interesting fact: The spec allows to nest `
  • ` elements directly under a `` tag, without the need for a `
      ` list. The requirement is that the `
    `'s `type` attribute is omitted or set to `"toolbar"`. See the specification for [the `
  • ` element](http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-li-element) and [the `` element](http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-menu-element).
  • – tomekwi May 27 '15 at 07:31
  • Can someone point me to `` in one of the W3C HTML5 specs? I'm finding it in the [WHAT WG version](https://html.spec.whatwg.org/#menus), but not in the [latest W3C HTML 5.3 draft](https://www.w3.org/TR/html53/dom.html#elements). – Garret Wilson Feb 21 '20 at 02:10