Open In App

How to define a list or menu of commands in HTML5 ?

Last Updated : 31 Mar, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The <menu> tag is used to define a list or menu of commands in HTML5. It can contain more than one <li> or <menuitem> elements. 

The <menu> tag is only supported by the latest Mozilla firefox web browsers. This tag also supports the event attributes in HTML5.

Syntax: 

<menu> </menu>

Example: The following example demonstrates the <menu> tag with the <li> tag to define the type of list.

Output:

        

menu tag 

Note: Use a Mozilla Firefox web browser for the output.

Example 2: The following example demonstrates using the <menu> tag with <menuitem> tag to display items.

The <menuitem> tag is not supported in the latest version of HTML i.e, HTML5. It is advised to use the previous version for the output.

Syntax: 

<menu>
   <menuitem> </menuitem>
</menu>

Output:

menuitem

Note: Use a Mozilla Firefox web browser for the output.


Next Article

Similar Reads