HTML <command> Tag
A <command> element can be marked up as follows:
<command type="command" label="Save" onclick="save()">Save</command>
Try it Yourself »
The <command> tag is currently not supported in any of the major browsers.
Note: Internet Explorer 9 (not earlier or later versions), supports the <command> tag.
Definition and Usage
The <command> tag defines a command (a radiobutton, a checkbox, or a command button) that the user can invoke.
A command can be part of a context menu or toolbar, using the <menu> element, or can be put anywhere else in the page, to define a keyboard shortcut.
Differences Between HTML 4.01 and HTML5
The <command> tag is new in HTML5.
New : New in HTML5.
|checkedNew||checked||Specifies that the command should be checked when the page loads. Only for type="radio" or type="checkbox"|
|disabledNew||disabled||Specifies that the command should be disabled|
|iconNew||URL||Specifies an image that represents the command|
|labelNew||text||Required. Specifies the name of the command, as shown to the user|
|radiogroupNew||groupname||Specifies the name of the group of commands that will be toggled when the command itself is toggled. Only for type="radio"|
|Specifies the type of command|
The <command> tag also supports the Global Attributes in HTML.
The <command> tag also supports the Event Attributes in HTML.
Thank You For Helping Us!
Your message has been sent to W3Schools.