References

Beginner-friendly references for web development, with live, editable examples.

The HTML <menu> tag

Element All modern browsers Updated
Quick answer

The HTML <menu> element is a semantic list of commands or interactive items — a toolbar or a set of actions. It is functionally equivalent to <ul> (its children are <li>) but signals that the items are interactive.

Overview

The <menu> element represents a semantic list of commands or interactive items — for example a toolbar of buttons. Structurally it works exactly like a <ul>: its direct children are <li> items, and browsers render it the same way.

The only real difference is semantic intent — a <menu> signals "a list of interactive commands," whereas a <ul> is a general unordered list. Earlier drafts gave <menu> context-menu and toolbar behaviors, but those were never widely implemented and have since been dropped.

So today it is simply an alternative to <ul> for lists of interactive items. When in doubt, a plain <ul> is perfectly fine and more widely understood.

Syntax

<menu>
  <li><button>Copy</button></li>
  <li><button>Paste</button></li>
</menu>

Example

Live example
<menu style="display:flex;gap:8px;list-style:none;padding:0;">
  <li><button>New</button></li>
  <li><button>Open</button></li>
  <li><button>Save</button></li>
</menu>

Best practices

  • Use <menu> for a list of interactive commands, such as a toolbar.
  • Structure it like a <ul>, with <li> children holding buttons or links.
  • When unsure, a plain <ul> is a perfectly good and more familiar choice.
  • Do not expect context-menu behavior — those earlier features were dropped.

Frequently asked questions

What is the menu element?
A semantic list of commands or interactive items, structured like a <ul> with <li> children.
What is the difference between menu and ul?
They are structurally identical; <menu> conveys "a list of interactive commands" while a <ul> is a general unordered list.
Does the menu element create a context menu?
No. Those earlier context-menu and toolbar behaviors were never widely implemented and have been removed.
When should I use menu instead of ul?
For a toolbar or group of interactive commands. If you are unsure, a <ul> is a safe, familiar choice.