4.4.7 The menu element
4.4.7 The menu element
Категории:
потоковое содержимое.
If the element's children include at least one li element: Palpable content.
Контексты, в которых может использоваться этот элемент:
Where flow content is expected.
Контентная модель:
Zero or more li and script-supporting elements.
Опущение тегов в text/html:
Ни один из тегов не может быть опущен.
Атрибуты контента:
глобальные атрибуты
Специфика доступности:
Для авторов.
Для разработчиков.
Санитизация:
Default.
DOM-интерфейс:
[Exposed=Window]
interface HTMLMenuElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members
};
The menu element represents a toolbar consisting of its contents, in the form of an unordered list of items (represented by li elements), each of which represents a command that the user can perform or activate.
The menu element is simply a semantic alternative to ul to express an unordered list of commands (a "toolbar").
In this example, a text-editing application uses a menu element to provide a series of editing commands:
<menu>
<li><button onclick="copy()"><img src="copy.svg" alt="Copy"></button></li>
<li><button onclick="cut()"><img src="cut.svg" alt="Cut"></button></li>
<li><button onclick="paste()"><img src="paste.svg" alt="Paste"></button></li>
</menu>
Note that the styling to make this look like a conventional toolbar menu is up to the application.