HTML slt;menu> label property
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:
<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
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
The property value
value | describe |
---|---|
text | Specify the visible label of the menu. |
HTML . . .