HTML and CSS Reference
In-Depth Information
Name
command
Synopsis
<command>
(XHTML:
<command/>
or
<command />
)
HTML5 only
. Used within a
menu
element, a
command
is an interactive element that repres-
ents an immediate action that can be triggered by the user (usually via
onclick
).
Notes
The
command
element has been replaced by the
menuitem
element in HTML5.1 and the
WHATWG specification, and should not be used. See the
menu
and
menuitem
listings.
Usage
Categories:
Metadata content, flow content, phrasing content
Permitted contexts:
Where metadata content is expected; where phrasing content is expected
Permitted content:
Empty
Start/end tags:
This is an empty (void) element, meaning it has only a start tag and may not have any con-
tents. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a
trailing slash (
<command/>
or
<command />
).
Attributes
HTML5 Global Attributes
checked
(
checked="checked"
in XHTML)
Indicates that a command is selected.