Horje

How to Add a <h1> element with a popover attribute, and a button to show/hide it - HTML popover Attribute

Click the button and it will toggle between showing and hiding the popover element.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The popover Attribute</h1>

<h1 popover id="myheader">Hello</h1>

<button popovertarget="myheader">Click me!</button>

<p>Click the button and it will toggle between showing and hiding the popover element.</p>

</body>
</html>

Output should be:

How to Add a <h1> element with a popover attribute, and a button to show/hide it - HTML popover Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin