Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML <menu> tag


May 04, 2021 HTML Reference Manual


Table of contents


HTML . . .

The label defines a menu list that achieves the same display as a sequenceless table, refer to the following example:

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 >

Try it out . . .

Browser support

HTML <menu> tag HTML <menu> tag HTML <menu> tag HTML <menu> tag HTML <menu> tag

Currently, mainstream browsers do not support the hashtag.


Label definition and instructions for use

The label defines a list of commands or menus. L abels are typically used for text menus, toolbars, and command list options.

Tips and comments

Tip: Use CSS to define menu list styles.


The difference between HTML 4.01 and HTML5

HTML 4.01's element is obsolete.

The elements in HTML5 have been redefined.


Property

New :HTML5 new property.

Attributes value describe
label New text Describe the tag of the menu item.
type New context
toolbar
list
Describe the display menu type. The default is "List".

Global properties

The label supports global properties and views the full property sheet HTML global properties.

The event property

The label supports all HTML event properties.

Related articles

HTML DOM Reference Manual: HTML DOM Menu Object