From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/html/element/command/index.html | 111 +++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 files/ko/web/html/element/command/index.html (limited to 'files/ko/web/html/element/command/index.html') diff --git a/files/ko/web/html/element/command/index.html b/files/ko/web/html/element/command/index.html new file mode 100644 index 0000000000..8353384f2a --- /dev/null +++ b/files/ko/web/html/element/command/index.html @@ -0,0 +1,111 @@ +--- +title: +slug: Web/HTML/Element/command +tags: + - HTML + - Obsolete + - Reference + - Web +translation_of: Web/HTML/Element/command +--- +
{{obsolete_header()}}
+ +

The HTML Command element (<command>) represents a command which the user can invoke. Commands are often used as part of a context menu or toolbar. However, they can be used anywhere on the page.

+ +
+

The <command> element is included in the W3C specification, but not in the WHATWG specification, and browser support is nonexistent. You should use the {{HTMLElement("menuitem")}} element instead, although that element is non-standard and only supported in Edge and Firefox.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Content categoriesFlow content, phrasing content, metadata content.
Permitted contentNone, it is an {{Glossary("empty element")}}.
Tag omissionThe start tag is mandatory, but, as it is a void element, the use of an end tag is forbidden.
Permitted parent elements{{HTMLElement("colgroup")}} only, though it can be implicitly defined as its start tag is not mandatory. The {{HTMLElement("colgroup")}} must not have a {{HTMLElement("span")}} as child.
DOM interface{{domxref("HTMLCommandElement")}}
+ +

Attributes

+ +

This element includes the global attributes.

+ +
+
{{htmlattrdef("checked")}}
+
Indicates whether the command is selected. Must be omitted unless the type attribute is checkbox or radio.
+
{{htmlattrdef("disabled")}}
+
Iindicates that the command is not available.
+
{{htmlattrdef("icon")}}
+
Gives a picture which represents the command.
+
{{htmlattrdef("label")}}
+
The name of the command as shown to the user.
+
{{htmlattrdef("radiogroup")}}
+
This attribute gives the name of the group of commands, with a type of radio, that will be toggled when the command itself is toggled. This attribute must be omitted unless the type attribute is radio.
+
{{htmlattrdef("type")}}
+
This attribute indicates the kind of command. This can be one of three values. +
    +
  • +

    command or empty which is the default state and indicates that this is a normal command.

    +
  • +
  • +

    checkbox indicates that the command can be toggled using a checkbox.

    +
  • +
  • +

    radio indicates that the command can be toggled using a radio button.

    +
  • +
+
+
+ +

Examples

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

Specifications

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#commands')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5 W3C', 'semantics.html#the-command-element', '<command>')}}{{Spec2('HTML5 W3C')}} 
+ +

Browser compatibility

+ + + +

{{Compat("html.elements.command")}}

+ +

{{ HTMLRef }}

-- cgit v1.2.3-54-g00ecf