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

HTML Reference Manual

Complete List of HTML Tags

HTML menu label attribute

The label attribute specifies the visible label of the menu, the label attribute is usually used to display the nested menu labels within the menu.

 HTML <menu> tag

Online Example

A toolbar with two menu buttons ("File" and "Edit") each of which is a dropdown menu with a series of options:

<!DOCTYPE html>
<html>
<head>
<title>HTML:<menu> label attribute - 基础教程网(oldtoolbag.com)</title>
</head>
<body>
<menu type="toolbar">
 <li>
  <menu label="File">
   <button type="button" onclick="file_new()">New...</button>
   <button type="button" onclick="file_open()">Open...</button>
   <button type="button" onclick="file_save()">Save</button>
  </menu>
 </li>
 <li>
  <menu label="Edit">
   <button type="button" onclick="edit_cut()">Cut</button>
   <button type="button" onclick="edit_copy()">Copy</button>
   <button type="button" onclick="edit_paste()">Paste</button>
  </menu>
 </li>
</menu>
<p><b>Attention:</b>Most mainstream browsers do not support the menu tag.</p>
</body>
</html>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Currently, almost no mainstream browsers support the label attribute.

Definition and Usage

The label attribute specifies the visible label of the menu.

The label attribute is usually used to display the nested menu tags within the menu.

HTML 4.01 with HTML5differences

In HTML5 In HTML5, the <menu> element is redefined and the label attribute is added.

Syntax

<menu label="text">

attribute value

valuedescription
textSpecifies the visible label of the menu.
 HTML <menu> tag