The <menuitem> element

This is a legacy/obsolete element. It's no longer defined in the specification, and using it will make your HTML invalid.

A command which the user can invoke from a custom pop-up menu defined by a <menu> element.

This is an empty element, so it shouldn't have a closing tag.

Full list of attributes

All the usual HTML global attributes are available

checked
Indicates whether or not a checkbox command is checked at the moment.
command
The ID of another <menuitem> element. This one is just a new presentation of the same command. For example, a command might be defined in one place and then reused in a toolbar or menu.
default
Boolean attribute, which if true indicates that this is the menu item which should be activated if the menu as a whole is activated rather than a specific item being chosen.
disabled
If present, the command is currently disabled and can't be invoked or toggled by the user.
icon
The URI of a file containing an icon image the browser can use to represent the command in the user interface.
label
The name of the command, which should be displayed to the user.
radiogroup
The name of the group of commands that this radio command belongs to.
title
The title attribute for a <menuitem> element is specifically a hint about what the command does, which might be provided by the browser as online help.
type
Indicates whether the command is just something that can be invoked or not, or whether it should be displayed something like a checkbox or radio button. Must be either command (the default value), checkbox, or radio.

The Web Design Academy Contact us

By form

By Phone

+44 (0)113 234 4611

By email

enquiries@thewebdesign.academy

By snail mail

Suite 3 15 South Parade Leeds LS1 5PQ United Kingdom