Specify a context menu for a <div> element. The context menu appears when a user right-clicks on the element:
The contextmenu attribute specifies a context menu for an element. The context menu appears when a user right-clicks on the element.
The value of the contextmenu attribute is the id of the <menu> element to open.
Attribute | |||||
---|---|---|---|---|---|
contextmenu | Not supported | Not supported | Yes | Not supported | Not supported |
The contextmenu attribute is new in HTML5.
Value | Description |
---|---|
menu_id | The id of the <menu> element to open |
HTML Tutorial: HTML Attributes