HTML <menu>

Anonymous contributor's avatar
Anonymous contributor
Published Jul 1, 2022Updated May 15, 2024
Contribute to Docs

The <menu> element represents an unordered list of items with more semantic meaning than a regular <ul> element.

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours

Syntax

<menu>
  <li><!-- Content here --></li>
</menu>

Each item is user-interactive content such as a link and buttons.

Example

The following example is a menu of buttons that might go well with a social media application:

<menu>
<li><button onclick="like()">Like</button></li>
<li><button onclick="share()">Share</button></li>
<li><button onclick="subscribe()">Subscribe</button></li>
</menu>

Each list item is a button with text and event listeners, prepended with the default dot marker:

Rendered <menu> tag example

All contributors

Contribute to Docs

Learn HTML on Codecademy

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours