Note/Warning The <menu> tag was deprecated in HTML4.01 but later included in HTML5.1 specification.
HTML <menu> tag
The <menu> tag specifies the list of commands which is used to build menus.
The menus can be context menu, list menu or toolbars.
Syntax:
<menu>content…</menu>
Example
<menu> <li>Brahmaputra River</li> <li>Narmada River</li> <li>Godavari River</li> <li>Yamuna River</li> <li>Mahanadi River</li> <li>Tapti River</li> </menu>
Default CSS Values
display: block;
list-style-type: disc;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
padding-left: 40px;
How Browser will display
BLOCK Level.
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
deprecated in HTML4.1 | No difference compared to HTML4 | Reintroduced in HTML5.1 specification |
Attributes used with <menu> tag
Attribute | Description |
---|---|
label | To define alabel name of the menu using a text. |
type | To display the type of menu. The menu types are - |
Global Attributes
The <menu> tag supports Global attributes.
Event Attributes
The <menu> tag supports Event attributes.
Supporting Browsers
Note/Info:
Most of the browsers does not support the <menu> tag so you should avoid using it.
Mozilla Firefox (8 and above) only supports it for context menus so it is better to use <ul> tag or <ol> tag instead.
Related Tags
<li>, <menuitem>, <ul> & <ol> tags.