menu (HTML element)
Example
The listing below shows a menu for a report of some kind:
<menu> <li>Main menu</li> <li>Introduction</li> <li>Executive summary</li> </menu>
- Type
- block-level element
- Contains
lielements only- Contained by
applet,blockquote,body,button,center,dd,del,div,fieldset,form,iframe,ins,li,map,noframes,noscript,object,td,th
Description
The menu
element was originally intended to be used to display lists of menu
choices, and is almost identical in its purpose to the dir element (except that, unlike
dir, the menu element was
not intended for multicolumn display).
Like the ol and ul list types, the
menu element contains a series of li items.
Note that
although the li is a block-level element and would normally be
able to contain other block-level elements, when it’s used in the context
of a menu, a child li element can
only contain inline elements.
The menu shown in the example would render as follows:

Use This for…
Use menu to
mark up a series of menu titles.
Compatibility
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | Full |
This element is now deprecated and has little, if any support in browsers.
When the menu element is
used, most browsers will simply render the list exactly as they would a
ul with a series of li elements. As
such, you’re better to use those elements instead, as this approach
ensures forwards and backwards compatibility, cross-browser support, and
validity.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

