<menu> HTML element is a semantic alternative to
<ul>. It represents an unordered list of items (represented by
<li> elements), each of these represent a link or other command that the user can activate.
In previous version of the HTML specification, the
<menu> element had an additional use case as a context menu. This functionality is now considered obsolete, and has been removed from the specification. Firefox was the only browser to implement this functionality which included the
|Tag omission||None, both the starting and ending tag are mandatory.|
|Permitted parents||Any element that accepts flow content.|
|Implicit ARIA role||
|Permitted ARIA roles||
This element includes the global attributes.
<ul> elements both represent an unordered list of items. The key difference is that
<ul> primarily contains items for display, whilst
<menu> is intended for interactive items, to act on.
In this example, a
<menu> is used to create a toolbar in an editing application.
Toolbar menus haven't been implemented in any known browsers yet.
<menu> <li><button onclick="copy()">Copy</button></li> <li><button onclick="cut()">Cut</button></li> <li><button onclick="paste()">Paste</button></li> </menu>
|HTML Standard (HTML)|
BCD tables only load in the browser