HTML <menu> Tags


A context menu with different <menuitem> elements :

 <menu type="context" id="mymenu">
  <menuitem label="Refresh" onclick="window.location.reload();" icon="ico_reload.png">
  <menu label="Share on...">
    <menuitem label="Twitter" icon="ico_twitter.png"
    <menuitem label="Facebook" icon="ico_facebook.png"
  <menuitem label="Email This Page"
Execute Code

Definition and Usage

The <menu> tag defines a list/menu of commands.

The <menu> tag is used for context menus, toolbars and for listing form controls and commands.

Browser Support

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

Element Chrome Internet Explorer Firefox Safari Opera
<menu> Not supported Not supported 8.0 (only context menus) Not supported Not supported

Note : The <menu> tag is only supported in Firefox, and it only works for context menus.

Tips and Notes

Tip : Use CSS to style menu lists.

Differences Between HTML 4.01 and HTML5

The <menu> element was deprecated in HTML 4.01.

The <menu> element is redefined in HTML5.


Attribute Value Description
label text Specifies a visible label for the menu
type list
Specifies which type of menu to display

Default CSS Settings

Most browsers will display the <menu> element with the following default values :

    display: block;
    list-style-type: disc;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
    padding-left: 40px;