English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This article introduces the usage of the HTML command label attribute, demonstrating online examples of how to use the HTML command label attribute, browser compatibility, syntax definition, and detailed information about its attribute values. The required label attribute specifies the name of the command, which is used to display to the user.
A <command> element with a label:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <command> label Attribute Usage-Basic Tutorial(oldtoolbag.com)</title> <script> function save() { alert("Some JavaScript...."); } </<script> </<head> <body> <menu> <command type="command" label="Save changes" onclick="save()">Save</command> </menu> <p><b>Notice:</b>Currently, almost all mainstream browsers do not support the label attribute.</p> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
Currently, almost all mainstream browsers do not support the label attribute.
The required label attribute specifies the name of the command, which is used to display to the user.
The <command> tag is a part of HTML5 new tag in
<command label="text">
Value | Description |
---|---|
text | Specifies the visible label for the command. |