HTML reference
menu
The <menu> element represents a list of commands or actions. It does not create a popup menu by itself; its behavior and appearance still need appropriate controls, CSS, and JavaScript.
What you will learn
- What action list
menurepresents - How to combine
li,button, and links - When
navorulis more suitable
Basic example
<menu aria-label="Editing actions">
<li><button type="button">Undo</button></li>
<li><button type="button">Redo</button></li>
</menu>The buttons perform actions; they do not navigate to another page. Give the group a useful accessible name when users need to distinguish it from other groups.
Choose the right element
- Use
navfor major navigation links between pages or sections. - Use
ulfor a general list that is not specifically a command list. - Use
buttonfor an action andafor navigation.
Older type, label, and command patterns from historical specifications should not be copied into new pages.