HTML <menu>Tag


Examples

Example of two menu button series options ("File" and "Edit"):

<menu type="toolbar"> <li> <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> </li> <li> <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> </li> </menu>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Currently mainstream browsers do not support the <menu> tag.


Tag Definition and Usage Instructions

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

The <menu> tag is typically used for text menus, toolbars, and command list options.


Tips and Notes

Tip:Use CSS to style the menu list.


Differences Between HTML 4.01 and HTML5

The <menu> element in HTML 4.01 is deprecated.

In HTML5, the <menu> element has been redefined.


Attributes

New: New in HTML5.

Attribute Value Description
labelNew text Defines a label for the menu item.
typeNew context
toolbar
list
Defines the type of menu to display. Default is "list".

Global Attributes

The <menu> tag supports the global attributes, view the complete attribute tableHTML Global Attributes。


Event Attributes

The <menu> tag supports allHTML Event Attributes。

Other Extensions