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:
|
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 | |||||
6 | 12 | 1 | 1 | ≤12.1 | 3 |
Tablets / Mobile | |||||
![]() |
|||||
1 | 18 | 4 | ≤12.1 | 1 | 1.0 |
Last updated by CSSPortal on: 6th December 2019