• ">
  • " />
    Easy Tutorial

    HTML <menu> Tag

    Example

    Two menu button series examples ("File" and "Edit"):

    <menu type="toolbar">
    <li>
        <menu label="File">
        <button type="button" onclick="file_new()">New...</button>
        <button type="button" onclick="file_open()">Open...</button>
        <button type="button" onclick="file_save()">Save</button>
        </menu>
    </li>
    <li>
        <menu label="Edit">
        <button type="button" onclick="edit_cut()">Cut</button>
        <button type="button" onclick="edit_copy()">Copy</button>
        <button type="button" onclick="edit_paste()">Paste</button>
        </menu>
    </li>
    </menu>
    

    Browser Support

    Currently, mainstream browsers do not support the <menu> tag.


    Tag Definition and Usage

    The <menu> tag defines a list of commands or a menu.

    The <menu> tag is typically used for text menus, toolbars, and command list options.


    Tips and Notes

    Tip: Use CSS to define the style of menu lists.


    Differences Between HTML 4.01 and HTML5

    The <menu> element in HTML 4.01 is obsolete.

    The <menu> element in HTML5 has been redefined.


    Attributes

    Attribute Value Description
    label New text Describes the label of the menu item.
    type New context <br>toolbar <br>list Describes the type of menu displayed. Default is "list".

    Global Attributes

    The <menu> tag supports global attributes. See the full list of HTML Global Attributes.


    Event Attributes

    The <menu> tag supports all HTML Event Attributes.