A context menu with different <menuitem> elements:
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.
The numbers in the table specify the first browser version that fully supports the element.
Element | |||||
---|---|---|---|---|---|
<menu> | Not supported | Not supported | 8.0 (only context menus) |
Not supported | Not supported |
Tip: Use CSS to style menu lists.
The <menu> element was deprecated in HTML 4.01.
The <menu> element is redefined in HTML5.
= New in HTML5.
Attribute | Value | Description |
---|---|---|
label | text | Specifies a visible label for the menu |
type | popup toolbar context |
Specifies which type of menu to display |
The <menu> tag also supports the Global Attributes in HTML.
The <menu> tag also supports the Event Attributes in HTML.
HTML DOM reference: Menu Object
Most browsers will display the <menu> element with the following default values: