HTML <menu> (Menu List or Command Menu) Tag
Experimental: This is an experimental technology
Example
<menu label="File">
<button type="button" onclick="new()">New</button>
<button type="button" onclick="open()">Open</button>
<button type="button" onclick="save()">Save</button>
<button type="button" onclick="saveas()">Save as</button>
</menu>
Meaning
The <menu> element is used to specifies a short list of items (<li> elements) that can occur in a menu of choices.
History
Traditionally, this looked like an unordered list under HTML 4 and prior versions; HTML5 intends to reintroduce this element as a user interface menu filled with command elements.
Note: This feature is included in the HTML5 specification, but has not been implemented in most mainstream web browsers.
Version: HTML 2, 3.2, 4, 4.01, 5
Standard Syntax
<menu>...</menu>
Browser Support
Status
Attributes
Attribute | Value | Description |
---|---|---|
label | text | Deprecated. Specifies a visible label for the menu |
type | context list toolbar context |
Specifies type of menu to display |
Global Attributes
<menu> element also supports the Global Attributes in HTML.
Event Attributes
<menu> element also supports the Event Attributes in HTML.
By Default CSS Value(s)
Most of the browsers will display the <menu> element with the following by default value(s)
menu {
display: block;
list-style-type: disc;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
padding-left: 40px;
}