CKTIS / HTML
menu — command list
The `menu` element represents an unordered list of user commands: a semantic toolbar. Individual commands belong in `li` elements.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<menu>
<li><button type="button">Command</button></li>
</menu>The menu element represents a toolbar: an unordered list of commands available to the user. It is a semantic alternative to ul for commands rather than arbitrary list items.
It is allowed wherever flow content is expected. Its content model permits zero or more li and script-supporting elements. Place a button inside li, not directly inside menu. Both menu tags are required; global attributes are available.
The application supplies toolbar styling. In the example, the Save button changes Ready to Saved through its event handler, not through menu itself.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Command list</title>
<menu>
<li><button type="button" onclick="document.getElementById('status').textContent = 'Saved'">Save</button></li>
</menu>
<p id="status">Ready</p>
</html>Result
Initially: Ready After clicking Save: Saved
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.