HTML <menu> tag (deprecated)S2C Home   « HTML <menu> tag

Definition

The <menu> tag is used for defining a menu list.

Use the <dl></dl>, <ol></ol> or <ul></ul> elements to define the type of list you want and use CSS to style it.

Example


<menu>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>Four</li>
</menu>

Required Attributes

NONE

Optional Attributes

compact - this attribute is deprecated, use CSS instead.

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<menu class="classname"></menu>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<menu id="idname"></menu>

style - specifies an inline style for the element allowing you to apply the style to the content.


<menu style="color:red;text-align:left"></menu>

title - specifies extra information about the content.


<menu title="information about the content"></menu>

Language Attributes

menu - specifies the menuectional flow of the content.


<!-- The text will flow from left to right -->
<menu menu="ltr"></menu>

<!-- The text will flow from right to left -->
<menu menu="rtl"></menu>

lang - specifies a language code for the content of the element.


<menu lang="en"></menu>

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.


<!-- Executes the go() function -->
<menu onkeydown="go()"></menu>

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<!-- Executes the go() function -->
<menu onkeypress="go()"></menu>

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<!-- Executes the go() function -->
<menu onkeyup="go()"></menu>

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<!-- Executes the go() function -->
<menu onclick="go()"></menu>

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<!-- Executes the go() function -->
<menu ondblclick="go()"></menu>

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<!-- Executes the go() function -->
<menu onmousedown="go()"></menu>

onmousemove - The JavaScript code to be run when the mouse button is moved.


<!-- Executes the go() function -->
<menu onmousemove="go()"></menu>

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<!-- Executes the go() function -->
<menu onmouseout="go()"></menu>

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<!-- Executes the go() function -->
<menu onmouseover="go()"></menu>

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<!-- Executes the go() function -->
<menu onmouseup="go()"></menu>

go to home page Homepage go to top of page Top