HTML Tag Reference - HTML tag <menuitem>

The <menuitem> tag defines a command/menu item that the user can invoke from a popup menu.

Browser compatibility

<menuitem> No No Yes No No

What's new in HTML5

The <menuitem> tag is new in HTML5.


Attribute Value Description
checked checked Mark to check that the menu item. Only for type="radio" or type="checkbox"
command string Command
default default Marks the menuitem as a default command
disabled disabled Disable menu item
icon URL Set an icon for the menu item
label text Required. Set the label of the menuitem
radiogroup groupname Mark the group name that will be toggled when the menu item is toggled. Only for type="radio"
type checkbox
Specifies the type of menu item. Default is "command"

Global Attributes

The <menuitem> tag supports the Global Attributes in HTML.

Event Attributes

The <menuitem> tag supports the Event Attributes in HTML.


<!DOCTYPE html>
<!--  ww  w  . jav  a2s  .c  o m-->
<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>



Click to view the demo