Syntax
<menu>
<li><button>Cut</button></li>
<li><button>Copy</button></li>
</menu>Examples
Toolbar of Actions
Using menu for a group of command buttons.
<menu>
<li><button onclick="save()">Save</button></li>
<li><button onclick="undo()">Undo</button></li>
<li><button onclick="redo()">Redo</button></li>
</menu>Styled Horizontal Menu
Laying out a menu of actions horizontally.
<menu style="display: flex; gap: 8px; list-style: none; padding: 0;">
<li><button>Edit</button></li>
<li><button>Delete</button></li>
<li><button>Share</button></li>
</menu>Context Menu Items
A list of commands representing right-click style actions.
<menu>
<li><button>Rename</button></li>
<li><button>Duplicate</button></li>
<li><button>Move to Trash</button></li>
</menu>Best practices
- Use menu specifically for lists of commands or actions, not general content — use ul for that
- Wrap each command in a proper interactive element like button, not just plain text
- Since visual rendering matches ul by default, do not rely on menu for any built-in styling — use CSS as you would for any list
- Consider whether a native button toolbar without menu wrapping is simpler for straightforward cases
Browser compatibility
Support applies to the named feature, not every attribute or behaviour in this article. Versions refer to browsers, not operating systems.
<menu>
Desktop
- Chrome
- Supported
From 1 - Firefox
- Supported
From 1 - Safari
- Supported
From 3 - Edge
- Supported
From 12 - Opera
- Supported
By 12.1 (possibly earlier)
Mobile
- Safari on iOS
- Supported
From 1 - Chrome for Android
- Supported
From 18 - Firefox for Android
- Supported
From 4 - Samsung Internet
- Supported
From 1.0
MDN BCD record for this feature · MDN reference
Support history and limitations
Chrome
- From 1
Firefox
- From 1
Safari
- From 3
Edge
- From 12
Opera
- By 12.1 (possibly earlier)
Safari on iOS
- From 1
Chrome for Android
- From 18
Firefox for Android
- From 4
Samsung Internet
- From 1.0
MDN BCD 8.1.5 · Dataset built 2026-10-08 · Mapping reviewed 2026-10-21. These dates are not individual browser-test or claim-verification dates. Unknown means the data does not establish support.