HTML menuitem: Main Tips
<menuitem>tag was used to declare a command which the user could request from a popup menu.
- To set up a new command, you could utilize one or multiple of tag-specific attributes.
- You could also use the
commandattribute to connect to other commands.
menuitemtag has been deprecated since HTML 5.2.
What <menuitem> Meant
Now unsupported HTML
menuitem element defined a command to invoke from the popup menu by the user:
<img src="https://cdn.bitdegree.org/learn/pom-laptop.png?raw=true" id="doggo" width="250" alt="Space Doggo" contextmenu="sunmenu"> <menu type="context" id="sunmenu"> <menuitem label="Zoom In" icon="https://github.com/bitdegree/banners/blob/master/banners/html_small.png?raw=true" onclick="zoomin()"> <menuitem label="Zoom Out" icon="https://github.com/bitdegree/banners/blob/master/banners/html_small.png?raw=true" onclick="zoomout()"> <menuseparator/> <menuitem label="Reload Image" icon="https://github.com/bitdegree/banners/blob/master/banners/html_small.png?raw=true" onclick="window.location.reload();"> </menu>
In the example above, you can also see a
<menuseparator/> tag which created a HTML
menuitem separator. It was a thin line separating the possible commands. When creating a website, HTML
menuitem separator could be used to group similar options to simplify the user experience.
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid certificates of completion
- Professional service
- Flexible timetables
- A variety of features to choose from
- Professional certificates of completion
- University-level courses
- Multiple Online degree programs
- Great user experience
- Offers quality content
- Very transparent with their pricing
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
Tag Attributes Used With HTML menuitem
There were seven tag-specific attributes to the now unsupported HTML
menuitem. See them in the table below:
|radiogroup||Defined the name of a group of commands to toggle.|
|checked||Identified the element as checked when the page was loading.|
|default||Set a command as the default one for menuitem.|
|disabled||Disabled the menuitem.|
|icon||Defined an icon for a specific menuitem.|
|label||Defined the menuitem's name to show to the user.|
|command||Indicated the ID of an individual element, pointing to a command to be requested indirectly.|
|type||Defined the menuitem type (command by default).|
Mobile browser support
Latest Udacity Coupon Found:
75% OFF COURSES
Udacity Black Friday Offer
The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!