HTML5 menuitem Tag

Define a menu item for a menu easily with the HTML5 menuitem tag. The user can invoke the menu item from a popup menu.

Here’s the output,

HTML5 Menuitem Tag

In the above output, you can see the Amazon MenuItem. Under that, we used a checkbox, which is visible in the output. The default is true and the checkbox is visible by default, since we added checked attribute as true.

Let’s say we unchecked the checkbox on the Amazon MenuItem, now the checkbox won’t be visible,

HTML5 Menuitem Tag Unchecked

Attributes

  • checked– This attribute is for type radio or checkbox. It has Boolean value, i.e. TRUE to show the selection of command by default, or FALSE.
  • command– The command attribute is for specifying the ID of a separate element.
  • default– For default command
  • disabled– This attribute shows the availability of command.
  • icon– You can add an image to the menu item for distinguishing it from others
  • label– name of the menu item
  • radiogroup– This attribute is for type radio. Here, you can add the name of a group of commands. This is to be toggled as radio buttons on selection.
  • type– It shows the type of command. For example, command, checkbox, radio, etc.
HTML5 mark Tag
HTML5 meter Tag
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue Reading