XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / menu
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
menu
HTML 4.01 | HTML 5 |
<menu> ... </menu>
The element menu, deprecated in HTML 4.01, marks a menu list of one or more list items (li). Menus were intended for short lists of choices, such as links to other documents.
In HTML 5, menu represents a list of interactive options or commands, such as a menu of options in a web application.
Start/end tag
Required/required
Attributes
Core, internationalization, events, global HTML 5 attributes
compact(compact="compact"in XHTML)Deprecated. Not in HTML 5. Makes the list as compact as possible. Few browsers support this attribute.
label="Text"HTML 5 only. Defines a menu label displayed in nested menus.
type="context|toolbar"HTML 5 only. Defines the menu’s state. The value
contextindicates a context menu available only when specifically activated, for example by right-clicking. The valuetoolbardefines the menu as an immediately accessible toolbar. Without the attributetype,menusimply contains a list of commands.
Example (HTML 4.01)
<menu>
<li>Über uns</li>
<li>Neuigkeiten</li>
<li>Blog</li>
<li>Kontakt</li>
</menu>Example (HTML 5)
<menu>
<command onclick="cut()" label="Ausschneiden">
<command onclick="copy()" label="Kopieren">
<command onclick="paste()" label="Einfügen">
<command onclick="delete()" label="Löschen">
</menu>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de