Last Updated : 12 Jul, 2025
The HTML <menuitem> tag is used to define command or menu that the user can utilize from the popup item. this tag is not supported in HTML5. This tag is support Global Attributes in HTML and Event Attributes in HTML.
Syntax:
<menuitem label="" icon="" type> </menuitem>
Attribute:
Below example illustrate the HTML <menuitem> tag:
Example:
HTML
<!DOCTYPE html>
<html>
<head>
<title>HTML <menuitem> Tag</title>
<style>
h1 {
color: green;
}
</style>
</head>
<body>
<center>
<h1>GeeksforGeeks</h1>
<h2>HTML <menuitem> tag</h2>
<div style="background:green; border:2px solid black; padding: 10px;"
contextmenu="geeks">
<p>A Computer Science Portal for Geeks</p>
<menu type="context" id="geeks">
<menu label="Share on...">
<menuitem label="Twitter"
onclick="window.open(
'//twitter.com/intent/tweet?text=' + window.location.href);">
</menuitem>
<menuitem label="Pinterest"
onclick="window.open(
'https://www.pinterest.com/pin/create/button/?url=' + window.location.href);">
</menuitem>
</menu>
<menuitem label="Email This Page"
onclick="window.location='mailto:?body=' + window.location.href;">
</menuitem>
</menu>
</div>
<p>A Computer Science Portal for Geeks</p>
<hr>
<p>Right-click on the green div to see the menuitem</p>
</center>
</body>
</html>
Output:
Supported Browsers: The browsers supported by <menuitem> tag are listed below:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4