Specify a context menu for a <p> element. The context menu should appear when a user right-clicks on the element:
![]()
The contextmenu attribute is not currently supported in any of the major browsers.
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.
The contextmenu attribute is new in HTML5.
| Value | Description |
|---|---|
| menu_id | The id of the <menu> element to open |
HTML Global Attributes
Your message has been sent to W3Schools.