HTML - <command>

The command element represents a command which the user can invoke.

Example

 

HTML
<command type="command" label="Save" icon="icons/save.png" onclick="save()">

Description  

The command element represents a command which the user can invoke.

Content categories Flow content, phrasing content, metadata content.
Permitted content None, it is an empty element.
Tag omission The start tag is mandatory, but, as it is a void element, the use an end tag is forbidden.
Permitted parent elements <colgroup> only, though it can be implicitly defined as its start tag is not mandatory. The <colgroup> must not have a <span> as child.
DOM interface HTMLCommandElement Obsolete since Gecko 24

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support No support No support No support No support
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support No support No support No support No support No support

Specifications  

Specification Status Comment
WHATWG HTML Living Standard
The definition of '<command>' in that specification.
Living Standard  
HTML5
The definition of '<command>' in that specification.
Recommendation  

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/command

HTML HTML:Element HTML:Element Reference HTML5 NeedsBrowserAgnosticism Obsolete