HTML and CSS Reference
In-Depth Information
onerror, onfocus, onformchange, onforminput, oninput, oninvalid, onkeydown,
onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart,
onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel,
onpause, onplay, onplaying, onprogress, onratechange, onreadystatechange,
onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit,
onsuspend, ontimeupdate, onvolumechange, onwaiting
Events Defined by Internet Explorer
onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate,
onbeforeeditfocus, onbeforepaste, onblur, onclick, oncontextmenu,
oncontrolselect, oncopy, oncut, ondblclick, ondeactivate, ondrag,
ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop,
onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup,
onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove,
onmouseout, onmouseover, onmouseup, 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.
label
This HTML5 attribute defines a string label for the menu. This will be particularly
useful in the case of a nested
menu
.
type
This HTML5 attribute indicates whether the menu should be a standard menu that
a user can interact with (
toolbar
) or a contextual menu, usually activated by a right-click
(
contextmenu
).
HTML 4 Example
<h2>
Taco List
</h2>
<menu>
<li>
Fish
</li>
<li>
Pork
</li>
<li>
Beef
</li>
<li>
Chicken
</li>
</menu>
HTML5 Examples
<menu type="menubar">
<command label="Add" type="Command" icon="plus.png">
<command label="Edit" type="Command" default>
<command label="Delete" type="Command" disabled>
</menu>
<menu type="context" label="Actions">
<menu type="context" label="New">