WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <menu> Tag


Example

A context menu with different <menuitem> elements:

<menu type="context" id="mymenu">
  <menuitem label="Refresh" onclick="window.location.reload();" icon="ico_reload.png">
  </menuitem>
  <menu label="Share on...">
    <menuitem label="Twitter" icon="ico_twitter.png"
    onclick="window.open('//twitter.com/intent/tweet?text='+window.location.href);">
    </menuitem>
    <menuitem label="Facebook" icon="ico_facebook.png"
    onclick="window.open('//facebook.com/sharer/sharer.php?u='+window.location.href);">
    </menuitem>
  </menu>
  <menuitem label="Email This Page"
  onclick="window.location='mailto:?body='+window.location.href;"></menuitem>
</menu>
Try it yourself »

Definition and Usage

<menu> A tag defines a command list or menu.

<menu> Tags are often used for text menus, toolbars, and command list options.


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Element
<menu> Not supported 12.0 Not supported 8.0
(only context menus)
Not supported Not supported


Differences Between HTML 4.01 and HTML5

HTML 4.01 <menu> The element is obsolete.

In HTML5 <menu> The element has been redefined.


Attributes

= New in HTML5.

Attribute Value Description
label text A label describing the menu item.
type list
toolbar
context
Description Displays the menu type. The default is "list".