/

HTML / CSS / JavaScript Tutorial

HTML Element: <menuitem>

[this page | pdf | back links]

The HTML <menuitem> element indicates a menu item/command that a user can invoke from a popup menu. It is new in HTML 5. In theory, it can be used for toolbars, context menus, listing form controls and commands. However, at the time of writing it was not supported by many browsers.

 

The attributes it can take (other than HTML global attributes and HTML event attributes) include:

 

Attribute

Description

More

checked

Specifies that the element should be pre-selected

Here

default

Default track / command to be enabled unless user preferences specify otherwise

Here

disabled

Specified element(s) to be disabled

Here

icon

Icon for a command / menu item

Here

label

Title / label command

Here

radiogroup

Name of group of commands when menu item toggled

Here

type

Type of element

Here

 

To create or access such an element in JavaScript see here. The corresponding HTML DOM object supports standard DOM properties and methods, and additional properties with the same name and meaning as the attributes of the underlying HTML element referred to above. It also supports the following additional properties:

 

Property

Description

More

command

Sets / returns the command property of the DOM object

Here

 

The default style applicable to this element is shown here.

 


NAVIGATION LINKS
Contents | Prev | Next | HTML Elements


Desktop view | Switch to Mobile