Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML <menuitem> disabled Attribute

  • Last Updated : 09 Nov, 2021

The HTML <menuitem> disabled attribute is a boolean attribute that specifies whether the menu item would be disabled or not. The disabled menu item is unclickable and usually, looks greyish in color. 


<menuitem disabled> 

Example: Below code demonstrates the use of disabled attribute in <menuitem> tag.  


<!DOCTYPE html>
        <h1 style="color:green;">
        <h2>HTML <menuitem> disabled Attribute</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.location.href);" disabled>
                    <menuitem label="Pinterest" onclick=
                <menuitem label="Email This Page" 
                    + window.location.href;">
<p>A Computer Science Portal for Geeks</p>
<p>Right click on green div and see the menuitem


Supported browsers: 

  • Mozilla Firefox 8.0

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!