HTML and menu and type properties

HTML menu type property HTML . . .

The type property is used to define the type of .

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 type property HTML menu type property HTML menu type property HTML menu type property HTML menu type property

Few mainstream browsers currently support type properties.


Definitions and usages

The type property specifies the type of menu.


The difference between HTML 4.01 and HTML5

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


Grammar

<menu type="list|context|toolbar">

The property value

value describe
list default.Specify a list menu.A user can execute or activate a list of commands (Li elements).
context Specify a context menu.The menu must be activated before the user interacts with the command.
toolbar Specify a toolbar menu.The active command allows the user to interact with the command immediately.


HTML menu type property HTML . . .