Home > Abakada: Back to Basics > Language References > HTML Elements > MENU Element
Represents a list of items, usually a list of links. | HTML 2, 3.2, 4, 4.01, 5 |
HTML Syntax
<menu
class = classname
id = value
style = css_style_rules
title = text
type = disc | circle | square
>
NOTE: Both start and end tags are required.
The <menu
> element displays a list of items. Like the UL element, menu is used with LI elements to define the individual items in the list.
menu is typically used to provide a list of links.
NOTE: This element has been deprecated in favor of the <ul> element.
The <menu>
element has no attribute of its own, but supports global attributes common to all HTML elements.
The following example shows how the <menu
> element may be used.
<menu>
<li><a href="http://www.cnn.com">CNN</a>
<li><a href="http://www.yahoo.com">Yahoo</a>
<li><a href="http://www.msn.com">Microsoft Network</a>
</menu>
which would render on a Web page as
The following example shows how to make the menu element behave like a horizontal toolbar, using CSS.
/* HTML */
<menu>
<li><button>Home</button></li>
<li><button>HTML</button></li>
<li><button>CSS</button></li>
</menu>
/* CSS */
menu {
display: flex; list-style: none;
padding: 0; width: 300px;
}
li { flex-grow: 1 }
button { width: 98% }
which would render on a Web page as
DIR LI OL UL Using Lists in HTML