Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML <menuitem> label Attribute

Improve Article
Save Article
  • Last Updated : 22 Oct, 2021
Improve Article
Save Article

The HTML <menuitem> label attribute is used to specify the text value which represents the name of command or menuitem.  


<menuitem label="text">

Attribute Values: It contains a single value that defines a shorter description.

Example: Below code illustrates the use of label attribute with the <menuitem> tag. 



<!DOCTYPE html>
        <h1 style="color: green;">
        <h2>HTML menuitem label 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);">
                    <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:

  • Firefox 8.0

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!