Arteqo Consulting

The European Web Agency

Design, brand and digital development


×

Arteqo Consulting Services

Contact Arteqo

×
I have read and accept the terms and conditions

menuitem tag

The menuitem tag, which, when implemented in the code, is written like this - <menuitem>, is an HTML tag that belongs to list tags. List HTML tags are used to create various types of lists, including ordered, unordered and descriptive lists.

<menuitem> creates a menu item within a context menu created by the <menu> tag. This tag is supported in the current version of HTML, which is HTML5.

Browser support

Here you can see whether <menuitem> is supported by a certain browser, and, if yes, starting from which version it is supported.

Browser support for <menuitem>
ChromeFirefoxEdgeOperaSafari
Not supportedSupported since Firefox v8Not supportedNot supportedNot supported

Attributes and values

An attribute is a piece of additional information about a tag. While tags denote the type of objects they mark or create, attributes set the parameters of these objects. These parameters can include anything from the types of possible interactions to its visual style to its actual contents.

Values indicate how a certain attribute is actually implemented, if there is a number of ways it can happen.

What attributes are actually allowed in a certain tag depends on the tag itself. Much like possible attributes depend on a tag, possible values depend on an attribute.

The <menuitem> tag supports the following attributes (with their respective values):

AttributeValueDescription
checkedcheckedSpecifies that the command/menu item should be checked when the page loads. Only for type="radio" or type="checkbox"
defaultdefaultMarks the command/menu item as being a default command
disableddisabledSpecifies that the command/menu item should be disabled
iconURLSpecifies an icon for the command/menu item
labeltextRequired. Specifies the name of the command/menu item, as shown to the user
radiogroupgroupnameSpecifies the name of the group of commands that will be toggled when the command/menu item itself is toggled. Only for type="radio"
type
  • checkbox
  • command
  • radio
Specifies the type of command/menu item. Default is "command"

Global Attributes

Global attributes are HTML tag attributes that can be used by any tag, hence the name "global". They are in contrast to unique attributes that are tag-specific.

<menuitem> supports global attributes.

Event Attributes

Event attributes are HTML tag attributes that allow triggering actions upon specific conditions, hence the name "event". Other types of attributes, namely global and unique attributes, can also trigger actions, but the difference is that even attributes allow calling scripts, such as JavaScript functions, while most other attributes only support a certain type of action.

<menuitem> supports event attributes.