HTML <menu> Tag

In HTML4, the <menu> element has become obsolete; it is recommended that you use <ul> instead. In HTML5, the <menu> element is again included, but in a different quality. Now it acts as a container for the <command> element and the creation of the menu.

Description

The <menu> HTML element is intended to display a list of menu items. Similarly to the <ol> and <ul> elements inside the <menu> container, the list is formed using <li>.

Properties

Permitted Parents
Any element that accepts flow content
Content
<menu>, <menuitem>, <li>, <hr> and <script>
Start/End Tags
Start tag: required, End tag: required

Example

<menu>
<li>CSS</li>
<li>PHP</li>
<li>ASP</li>
</menu>

Attributes

Attribute Definition
label Specifies the label of the menu. It is used by the browser/user agent to to display nested menus
type Specifies the kind of menu being declared.

Possible Values:
  • popup
  • toolbar
  • list

Global Attributes

The <menu> tag also supports the Global Attributes in HTML5

Event Attributes

The <menu> tag also supports the Event Attributes in HTML5

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
61211≤12.13
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
1184≤12.111.0

Last updated by CSSPortal on: 6th December 2019