HTML menu Tag

The HTML <menu> tag is used for specifying a list of commands. It is used for creating context menus, toolbars and listing form controls and commands.
Each list item in <menu> tag starts with the <li> or the <menuitem> elements.

Example of Code

<!DOCTYPE html>
<div style="background:yellow;border:1px solid #cccccc;padding: 10px;" contextmenu="mymenu">
<p>Right-click inside this box to see the context menu!</p>
<menu type="context" id="mymenu">
  <menuitem label="Refresh" onclick="window.location.reload();" icon="ico_reload.png"></menuitem>
  <menu label="Share on...">
    <menuitem label="Twitter" icon="ico_twitter.png" onclick="window.open('//twitter.com/intent/tweet?text=' + window.location.href);"></menuitem>
    <menuitem label="Facebook" icon="ico_facebook.png" onclick="window.open('//facebook.com/sharer/sharer.php?u=' + window.location.href);"></menuitem>
  <menuitem label="Email This Page" onclick="window.location='mailto:?body='+window.location.href;"></menuitem>
<p>This example currently only works in Firefox!</p>


Right-click inside this box to see the context menu!


This example currently only works in Firefox!