English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete List of HTML Tags

HTML: <command> label attribute

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.

 HTML <command> tag

Online Example

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Currently, almost all mainstream browsers do not support the label attribute.

Definition and Usage

The required label attribute specifies the name of the command, which is used to display to the user.

HTML 4.01 and HTML5differences between

The <command> tag is a part of HTML5 new tag in

Syntax

<command label="text">

Attribute Value

ValueDescription
textSpecifies the visible label for the command.
 HTML <command> tag