command

FilterElements

HTML: <command>
XHTML: <command/>  or  <command />

HTML5 only. Used within a menu element, a command is an interactive element that represents an immediate action that can be triggered by the user (usually via onclick).

Start/End Tags

This is an empty element. It must be closed with a trailing slash in the XML serialization of HTML5.

Specifications

  • HTML5

checked

Values: None in HTML. checked="checked" in XHTML5.
Indicates that a command is selected.

disabled

Values: None in HTML. disabled="disabled" in XHTML5.
Indicates that a command is not available in the current state.

icon=

Values: URL
Specifies the location of an image to be used as a button for the command.

label=

Values: text (may not be an empty string)
Required. Provides the name of the command, as displayed to the user.

radiogroup=

Values: text
Specifies the name of a group of commands when the command type is set to radio.

title=

Values: text
Provides a hint describing the command to aid the user.

type=

Values: command | checkbox | radio
Indicates the kind of command. The command keyword indicates a normal command with an associated action. checkbox indicates the command state can be toggled on or off. radio indicates the command represents the selection of one item from a list of items.
<menu>
  <command onclick="cut()" label="Cut">
  <command onclick="copy()" label="Copy">
  <command onclick="paste()" label="Paste">
  <command onclick="delete()" label="Clear">
</menu>

Rendered Example

           

HTML5 menus are not yet supported and can not be displayed.