May 03, 2021 HTML5
HTML5 is used to define menu lists.
Two examples of menu button series options ("File" and "Edit"):
<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>
Currently, mainstream browsers do not support the hashtag.
Note: This element was deprecated in HTML4, but then HTML 5.1 (in drafting) is re-recommended.
The label defines a list of commands or menus.
Labels are typically used for text menus, toolbars, and command list options.
Tip: Use CSS to define menu list styles.
HTML 4.01's element is obsolete.
The elements in HTML5 have been redefined.
New: HTML5 new property.
Property | Value | Describe |
---|---|---|
label New | text | The tag that describes the menu item. |
type New |
context
toolbar list |
Describes the type of menu displayed. The default is list. |
The label supports global properties and views the full property sheet HTML global properties.
The label supports all HTML event properties.