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 to 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, redefine the <menu> element and add the label attribute.

syntax

<menu label="text">

attribute value

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