HTML menu Tag

HTML <menu> element defines a list or set of options that users can choose from or interact with. It is employed to generate context menus and lists of items.

A <menu> element can contain one or more <li> or <menuitem> elements within it.

Note: The <menu> tag was deprecated in HTML 4.01 and again included in HTML 5.1 specification. But it will better to ignore it as it is experimental and not supported by many browsers.

Syntax

Example

<menu>........<menu>

Here are some details regarding the HTML <menu> element:

Display Inline
Start tag/End tag Both Start and End tag
Usage Semantic and textual

Example

Example

<!DOCTYPE html>

  <html>

 <head>

  <title>Menu Tag</title>

  </head>

  <body>

  <h2>Example of Menu Tag</h2>

 <menu>

 	<li>Home</li>

 	<li>Registration</li>

 	<li>Contact-us</li>

 	<li>About-us</li>

 </menu>

</body>

</html>

Output:

Attribute:

Tag-specific attributes:

  • popup
  • toolbar
  • context
Attribute Value Description
label text It specifies the label for the menu.
type It specifies the type of the menu in an HTML document.

Global attribute:

The <menu> tag enables the use of universal attributes in HTML.

Event attribute:

The <menu> tag facilitates the utilization of event attributes within HTML.

Supporting Browsers

Element Chrome IE Firefox Opera Safari
<menu> No No Yes No No

Input Required

This code uses input(). Please provide values below: