Learn html - html tutorial - Contextmenu attribute in html - html examples - html programs
- The contextmenu attribute defines a context menu for an element.
- The context menu occurs when a user right-clicks on the element.
- The contextmenu attribute value is the id of the <menu> tag to open.
- The contextmenu attribute is section of the Global Attributes.
Syntax for contextmenu attribute:
Differences between HTML 4.01 and HTML5 for contextmenu attribute:
HTML 4.01
- The contextmenu attribute has not been defined.
HTML5
- HTML 5 support contextmenu attribute.
Applies to:
Elements |
Attribute |
All HTML Elements |
contextmenu |
Attribute Values:
Value |
HTML 4.0.1 |
HTML 5 |
Description |
menu_id |
No |
yes |
Specifies the <menu> tag id to open |
Sample coding for contextmenu attribute:
Code Explanation for contextmenu attribute:
- contextmenu attribute used to add a specific context menu to the browser.
- id attribute of <menu> tag will be used by the contextmenu attribute.
Sample Output for contextmenu attribute:
- The output shows the context menu as “wikitechy”.
Browser Support for contextmenu attribute:
Tips and Notes
- The context menu attribute is only supported in Firefox.
Related Searches to contextmenu Attribute in html
context menu html5 example
html5 context menu chrome
context menu javascript
html context
html5 context menu attribute
context menu jquery
css context menu
html tutorialshtml editor html code html form html tutorial html color html color codes html table html img html5 html code for website html and css html programs html website free html editor html5 tutorial wysiwyg html editor html tutorial pdf html converter php tutorial html example html tutorial css tutorial html css html tags html basics code html html online html mailto html lang html tags list
html attributes