English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

HTML tag大全

HTML: <menu> tag

HTML: The <menu> tag defines an unordered menu list in an HTML document. This tag is also commonly referred to as the <menu> element.

Online example

Two series of menu button options examples ("File" and "Edit"):

!doctype html
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 menu tag usage (Basic Tutorial Website oldtoolbag.com)</title>
</head>
<body>
<menu type="toolbar">
  <li>
    <menu label="File">
      <button type="button" onclick="new()">New</button>
      <button type="button" onclick="save()">Save</button>
    </menu>
  </li>
  <li>
    <menu label="Edit">
      <button type="button" onclick="copy()">Copy</button>
      <button type="button" onclick="paste()">Paste</button>
    </menu>
  </li>
</menu>
</body>
</html>
Test to see ‹/›
In this HTML5In the document example, we used the <menu> tag with a toolbar style to create an unordered menu list. The toolbar contains a 'File' menu with 'New' and 'Save' options, and an 'Edit' menu with 'Copy' and 'Paste' options.

Browser compatibility

IEFirefoxOperaChromeSafari

The <menu> tag is not supported by mainstream browsers at present.

Definition and Usage Description

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

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

The <menu> tag is composed of <li> tags.

You can nest <ol>, <ul>, and <menu> lists.

Tips and Notes

Tip: Use CSS to define the style of the menu list.

HTML 4.01 and HTML5differences between

HTML 4.01The <menu> element is deprecated.

HTML5 The <menu> element has been redefined in the middle.

Attribute

AttributeValueDescription
labelHTML5textDescription of the marker for menu items.
typeHTML5context
toolbar
list
Description of the 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.