The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.


< html‎ | elements
Jump to: navigation, search


This article is In Progress.

W3C Editor's Draft


The menu element represents information as a list of items or commands.

Overview Table

DOM Interface HTMLMenuElement

The menu element is used to define a list as a menu of commands. It can have event and global attributes in addition to two of its own.

The menu element has partial support in Firefox only for the context form.


  • label - Text for the label to display for the menu item.
  • type - How the menu should be displayed to the user. Possible values are:
    • context - Display a series of entries triggered by another element. Like a dropdown for example.
    • list - Default. The name could change to toolbar in HTML 5.1. Displays menu items that are always within view.

The menu element also accepts global attributes and event attributes.


This is an example of the menu element using the type and label attributes as well as the button element.


<menu type="toolbar">
  • <menu label="File"> <button type="button" onclick="file_new()">New...</button> <button type="button" onclick="file_open()">Open...</button> <button type="button" onclick="file_save()">Save</button> </menu>
  • <menu label="Edit"> <button type="button" onclick="edit_cut()">Cut</button> <button type="button" onclick="edit_copy()">Copy</button> <button type="button" onclick="edit_paste()">Paste</button> </menu>
  • </menu>

    View live example


     The menu and ul both represent an unordered list of items. They differ in the way that the ul element only contains items to display while the menu element contains interactive items, to act on.

    Related specifications

    Specification Status Related Changes
    HTML 5.1 W3C Working Draft

    See also

    Other articles


    This article contains content originally from external sources.

    Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]