Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML tag

HTML tag

Example

Two examples of menu button series ("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 »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Currently, major browsers do not support the

tag.


Tag Definition and Usage Notes

tag, which defines a command list or menu. The tag is typically used for text menus, toolbars, and command list options.

Tips and Notes

Tip: Use CSS to style the menu list.


Differences between HTML 4.01 and HTML5

The in HTML 4.01

element is deprecated.

In HTML5, the

The element has been redefined.


property

New: new attribute in HTML5.

property Value Description
labelNew text Describes a marker for a menu item.
typeNew context
 toolbar       

 list | Description显示菜单类型. 默认为 "list"。 |

Global Attributes

The tag supports global attributes; see the full list in [HTML Global Attributes](/tags/ref-standardattributes.html).

Event attribute

The tag supports all [HTML Event Attributes](/tags/ref-eventattributes.html).