English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML: Die <menu>-Marke definiert in einem HTML-Dokument eine unsortierte Menüliste. Dieser Tag wird auch als <menu>-Element bezeichnet.
Beispiel für zwei Menü-Button-Serie-Optionen ("Datei" und "Bearbeiten"):
!doctype html <html> <head> <meta charset="UTF-8"> <title>HTML5 menu标签的使用(基础教程网 oldtoolbag.com)</title> </head> <body> <menu type="toolbar"> <li> <menu label="File"> <button type="button" onclick="new()">New</button> <button type="button" onclick="save()">Save</button> </menu> </li> <li> <menu label="Edit"> <button type="button" onclick="copy()">Copy</button> <button type="button" onclick="paste()">Paste</button> </menu> </li> </menu> </body> </html>Testen Sie heraus, ob es funktioniert ‹/›
IEFirefoxOperaChromeSafari
The <menu> tag is not supported by mainstream browsers at present.
The <menu> tag defines a command list or menu.
The <menu> tag is usually used for text menus, toolbars, and command list options.
The <menu> tag is composed of <li> tags.
You can nest <ol>, <ul>, and <menu> lists.
Hint: Use CSS to define the menu list style.
HTML 4.01The <menu> element is deprecated.
HTML5 The <menu> element has been redefined in the middle.
Attribute | Value | Description |
---|---|---|
labelHTML5 | text | Description of the menu item's marker. |
typeHTML5 | context toolbar list | Description of the menu type. The default is "list". |
<menu> Tag supports global attributes, see the complete attribute table HTML Global Attributes.
<menu> Tag supports all HTML Event Attributes.