XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / command

(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

   

HTML 5

command

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

The element command is used within a menu element. As an interactive element, it represents an immediate action triggered by the user, usually through an onclick event.

Notes

HTML 5 only.

Start/end tag

This is an empty element. In the XML serialization of HTML 5, it must end with a slash before the closing angle bracket.

Attributes

Global HTML 5 attributes

  • checked (checked="checked" in XHTML 5)

    Indicates that a command is selected.

  • disabled (disabled="disabled" in XHTML 5)

    Indicates that a command is unavailable in the current state.

  • icon="URL"

    Specifies the location of an image used as the command’s button.

  • label="Text"

    Defines the command name displayed to the user.

  • radiogroup="Text"

    Defines the name of a group of commands if the attribute type has the value radio.

  • title="Text"

    Contains short help text for the command.

  • type="command|checkbox|radio"

    Defines the command type. The keyword command represents a normal command with an associated action. checkbox means that the current state can be switched on or off. radio means that one of several alternatives can be selected.

Example

<menu>
  <command onclick="cut()" label="Ausschneiden">
  <command onclick="copy()" label="Kopieren">
  <command onclick="paste()" label="Einfügen">
  <command onclick="delete()" label="Löschen">
</menu>

 

> back to the alphabetical list of elements

   

 

 

 

back to top