<menu> Tag in HTML

The <menu> tag in HTML represents a list or group of commands, typically rendered as a contextual menu. It can be used to display interactive options or a list of items in a structured format. The <menu> tag was originally used for context menus, toolbars, and lists of commands, but now it’s primarily used for listing items.

Key Points on <menu> Tag:

Syntax of <menu> Tag:

Syntax Example

<menu>
            <li>Item 1</li>
            <li>Item 2</li>
            <li>Item 3</li>
        </menu>

Example of <menu> Tag in HTML:

This example shows a simple menu listing items.

Code Example

<menu>
            <li>Home</li>
            <li>About Us</li>
            <li>Services</li>
            <li>Contact</li>
        </menu>

Output

  • Home
  • About Us
  • Services
  • Contact
  • Attributes of <menu> Tag:

    The <menu> tag is not widely used and may be styled differently across browsers. While it can represent lists of options or commands, consider using alternative list tags (<ul> or <ol>) for traditional lists, with added styles for interactive elements.