<menu>


HTML <menu> Tag

Instance

<html>
<body>

<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>

<p><b>Note:</b> The <menu> tag is not supported in any of the major browsers.</p>

</body>
</html>

Run Example»

Click the "Run Instance" button to view the online instance


Browser support

1000.png

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


Tag definition and usage instructions

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

<menu> tags are commonly used for text menus, toolbars, and command list options.


Tips and Notes

Tips: Use CSS to style the menu list.


Differences between HTML 4.01 and HTML5

The <menu> element in HTML 4.01 has been deprecated.

The <menu> element has been redefined in HTML5.


Attributes

New: HTML5 new attributes.

AttributeValueDescription
labelNew textTag describing the menu item.
typeNewcontext
toolbar
list
Describes the display menu type. The default is "list ".

Global attributes

<menu> tag supports global attributes, see the complete attribute table HTML global attributes.


Event attributes

<menu> tag supports all HTML event attributes.