HTML slt;menu> label property

HTML menu label property HTML . . .

The label property specifies the visible labels for the menu, refer to the following example:

Toolbar with two menu buttons ("File" and "Edit"), each with a drop-down menu with a range of options:

<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>

Try it out . . .

Browser support

HTML menu label property HTML menu label property HTML menu label property HTML menu label property HTML menu label property

Few mainstream browsers currently support the label property.


Definitions and usages

The label property specifies the visible label for the menu.

Label properties are typically used to display menu labels nested within menus.


The difference between HTML 4.01 and HTML5

In HTML5, the element is redefined and the label property is added.


Grammar

<menu label="text">

The property value

value describe
text Specify the visible label of the menu.


HTML menu label property HTML . . .