NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<menu> (Menu List)


This element is used to indicate a short list of items that can occur in a menu of choices.

Syntax (Transitional Only)



<menu
class="class name(s)"
compact="compact"
dir="ltr | rtl"
id="unique alphanumeric string"
lang="language code"
style="style information"
title="advisory text">

</menu>

Attributes Defined by Internet Explorer


accesskey="key"(5.5)
contenteditable=" false | true | inherit"(5.5)
disable="false | true"(5.5)
hidefocus="true | false"(5.5)
tabindex="number"(5.5)
unselectable="on | off"(5.5)

Events Defined by Internet Explorer


onactivate, onbeforecopy, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate, onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy, oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture, onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste, onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart, onselectstart, ontimeerror

Element Specific Attributes


compact
This attribute indicates that the list should be rendered in a compact style. Few browsers actually change the rendering of the list regardless of the presence of this attribute. The compact attribute requires no value under traditional HTML but should be set to a value of compact under XHTML transitional.

Example


<h2>Taco List</h2>
<menu>
  <li>Fish</li>
  <li>Pork</li>
  <li>Beef</li>
  <li>Chicken</li>
</menu>

Compatibility


HTML 2, 3.2, 4, 4.01 (transitional)
XHTML 1.0 (transitional)
Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 1, 2, 3, 4, 4.5 – 4.8, 6, 7
Opera 4 – 7

Notes


Under the strict HTML and XHTML specifications, this element is not defined. Because most browsers simply render this style of list as an unordered list, using the <ul> tag instead is preferable.

The HTML 2.0 and 3.2 specifications support only the compact attribute.

Most browsers tend not to support the compact attribute.

(X)HTML Elements
CSS Properties
Previous: marquee Next: meta
< Home | About | Chapters | Examples | Errata | Reference | Site Map >