HTML <button> popovertarget Attribute
Example
Refer to a popover element with the popovertarget attribute:
<button popovertarget="tip1">Show Tip</button>
<div id="tip1"
popover>
Here we can show a
helpful tip.
</div>
Try it Yourself »
Definition and Usage
The popovertarget attribute refers to the popover element with the
specified id.
Syntax
<button popovertarget="element_id">
Attribute Values
| Value | Description |
|---|---|
| element_id | The id of the popover element related to this button |
Browser Support
| Attribute | |||||
|---|---|---|---|---|---|
| popovertarget | 114 | 114 | 125 | 17 | 100 |
Related Pages
HTML global attributes: popover
HTML <button> attribute: popovertargetaction
HTML tutorial: Popover API