Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<menu>

A list of commands — for example, a toolbar; behaves like `<ul>`.

Syntax

<menu>
  <li><button>Action</button></li>
</menu>

Examples

A toolbar:

<style>
  menu { display: flex; gap: 6px; padding: 0; list-style: none; }
</style>
 
<menu>
  <li><button>Copy</button></li>
  <li><button>Paste</button></li>
  <li><button>Delete</button></li>
</menu>

Notes

Browsers display <menu> just like <ul>. The difference is meaning only: the items are actions rather than ordinary list items. For site navigation use <nav> with a list of links.

See also

  • <ul> — A bulleted list: items whose order does not matter.
  • <li> — An item of a `<ul>`, `<ol>` or `<menu>` list.
  • <button> — A button: submits a form or triggers an action.

In the tutorial

  • Lists — Bulleted and numbered lists, numbering options, nested lists and description lists in HTML.

Thanks for reading!

Donate to the site — we work hard for you.