HTML: The Markup Language

command type=commandcommand with an associated action NEW # T

The command element with a type attribute whose value is "command" represents a command with an associated action.

Permitted content #

empty (void element)

Permitted attributes #

Descriptions for attributes specific to this element #

type = "command"
Specifies that its command element is a command with an associated action.
label = string
The name of the command, as shown to the user.
icon = URI
A URL for an image that represents the command.
disabled = "disabled" or "" (empty string) or empty
Specifies that the command is not currently available.

Tag omission #

The command element is a void element. A command element must have a start tag but must not have an end tag.

Permitted parent elements #

any element that can contain metadata elements, any element that can contain phrasing elements

DOM interface #

interface HTMLCommandElement : HTMLElement {
           attribute DOMString type;
           attribute DOMString label;
           attribute DOMString icon;
           attribute boolean disabled;
           attribute boolean checked;
           attribute DOMString radiogroup;