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

在线工具

参考手册

: <progress> 标签

HTML menu label 属性

 HTML <menu> Tag

label 属性规定了menu的可见标签,label 属性通常用于显示menu内嵌套的菜单标签。

在线示例

示例
<!DOCTYPE html>
<html>
<head> - <title>HTML:<menu> label 属性3基础教程网(w/codebox.com)<
</title>
head>
<body>
 <li>
  <menu type="toolbar">
   <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 tag for the menu.

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

HTML 4.01 with HTML5differences

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

Syntax

<menu label="text">

attribute value

valuedescription
textSpecifies the visible tag for the menu.
 HTML <menu> Tag