Computer >> Computer tutorials >  >> Programming >> HTML

How do we add a menu list in HTML?


Use the <menu> tag in HTML to add a menu list. The HTML <menu> tag is used for creating a menu list.

The HTML <menu> tag also supports the following additional attributes −

Attribute
Value
Description
label How do we add a menu list in HTML?
text
Specifies a visible label.
type How do we add a menu list in HTML?
popup
toolbar
context
Specifies the type of menu to be displayed.


Note − This tag deprecated in HTML and redefined in HTML5

Example

You can try to run the following code to add a menu list in HTML −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML menu Tag</title>
   </head>
   <body>
      <menu>
         <li>ol - ordered list</li>
         <li>ul - unordered list</li>
         <li>dir - directory list</li>
         <li>menu - menu list</li>
      </menu>
   </body>
</html>