w3resource

HTML menu tag and element

1. HTML menu element is used to create a single column menu list.

2. This element is deprecated.

Syntax

<menu>
<li>List item one</li> 
<li>List item two </li> 
..................................  
</menu>

Category

HTML menu element is a part of HTML Lists.

Whether both start and end tags are required

Yes.

Can contain

HTML menu element can contain one or more li elements that cannot contain block level elements.

Can reside within

HTML menu element can reside within APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH.

Attributes

Attributes specific to this element

None.

Identifiers

id, class.

language information and text direction

lang, dir.

Title

Title.

Style

Style.

Events

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup.

Supported doctypes

HTML 4.01 Strict, HTMl 4.01 Transitional, and HTMl 4.01 Frameset.

Example of using HTML menu element

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>html menu tag example</title>
</head>
<body>
<menu>
<li>HTML Lists. </li>
<li>HTML Unordered Lists.</li>
<li>HTML Ordered Lists.</li>
<li>HTML Definition Lists.</li>
</menu>
</body>
</html>

Result

html menu element

View this example in a separate browser window

HTML menu tag example.

Pictorial presentation

html-menu-tag

Previous: HTML dir tag and element
Next: HTML table tag and element

Test your Programming skills with w3resource's quiz.



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/html/menu/HTML-menu-tag-and-element.php