This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
Summary
The HTML <menuitem> element represents a command that a user is able to invoke through a popup menu. This includes context menus, as well as menus that might be attached to a menu button.
A command can either be defined explicitly, with a textual label and optional icon to describe its appearance, or alternatively as an indirect command whose behavior is defined by a separate element. Commands can also optionally include a checkbox or be grouped to share radio buttons. (Menu items for indirect commands gain checkboxes or radio buttons when defined against elements <input type="checkbox"> and <input type="radio">.)
| Content categories | None. | 
|---|---|
| Permitted content | None, it is an empty element. | 
| Tag omission | Must have a start tag and must not have an end tag. | 
| Permitted parent elements | The <menu>element, where that element is in the popup menu state. (If specified, thetypeattribute of the<menu>element must bepopup; if missing, the parent element of the<menu>must itself be a<menu>in the popup menu state.) | 
| DOM interface | HTMLMenuItemElement | 
Attributes
This element includes the global attributes; in particular title can be used to describe the command, or provide usage hints.
- checked
- Boolean attribute which indicates whether the command is selected. May only be used when the typeattribute ischeckboxorradio.
- command
- Specifies the ID of a separate element, indicating a command to be invoked indirectly. May not be used within a menu item that also includes the attributes checked,disabled,icon,label,radiogrouportype.
- default
- This Boolean attribute indicates use of the same command as the menu's subject element (such as a buttonorinput).
- disabled
- Boolean attribute which indicates that the command is not available in the current state. Note that disabledis distinct fromhidden; thedisabledattribute is appropriate in any context where a change in circumstances might render the command relevant.
- icon
- Image URL, used to provide a picture to represent the command.
- label
- The name of the command as shown to the user. Required when a commandattribute is not present.
- radiogroup
- This attribute specifies the name of a group of commands to be toggled as radio buttons when selected. May only be used where the typeattribute isradio.
- type
- This attribute indicates the kind of command, and can be one of three values.
 - command: A regular command with an associated action. This is the missing value default.
- checkbox: Represents a command that can be toggled between two different states.
- radio: Represent one selection from a group of commands that can be toggled as radio buttons.
 
Examples
<menuitem type="command" label="Save" icon="icons/save.png" onclick="save()">
Specifications
| Specification | Status | Comment | 
|---|---|---|
| WHATWG HTML Living Standard The definition of '<menuitem>' in that specification. | Living Standard | |
| HTML5.1 The definition of '<menuitem>' in that specification. | Working Draft | 
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari | 
|---|---|---|---|---|---|
| Basic support | ? | 8 (8) | ? | ? | ? | 
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | 
|---|---|---|---|---|---|
| Basic support | ? | 8.0 (8) | ? | ? | ? |