The <menu> tag marks a menu of commands.
The <menu> tag can be used for context menus, toolbars and for listing form controls and commands.
<menu> |
No | No | Yes | No | No |
The <menu> element is redefined in HTML5.
Attribute | Value | Description |
---|---|---|
label | text | label for the menu |
type | popup toolbar context |
Set type of menu to display |
The <menu> tag supports the Global Attributes in HTML.
The <menu> tag supports the Event Attributes in HTML.
menu { display: block; list-style-type: disc; margin-top: 1em; margin-bottom: 1em; margin-left: 0; margin-right: 0; padding-left: 40px; }
<!DOCTYPE html>
<html>
<body>
<!-- ww w . ja v a2s .com-->
<div style="background:red;border:1px solid black;" contextmenu="mymenu">
<p>Right-click inside this box to see the context menu!
<menu type="context" id="mymenu">
<menuitem label="Refresh is added from menu"></menuitem>
</menu>
</div>
</body>
</html>