HTML interestfor Attribute
The interestfor attribute shows a popover or other element when the user shows interest in a link or button, for example by hovering or focusing it.
Description
The interestfor attribute turns a <button> or <a> element into an interest invoker. Its value is the id of another element, usually a popover, that is shown when the user "shows interest" in the invoker by hovering over it, focusing it with the keyboard or long-pressing it on a touch screen, and hidden again when interest is lost.
This allows tooltips and hover cards without JavaScript. The delays before showing and hiding are controlled with the CSS interest-delay properties, and the :interest-source and :interest-target pseudo-classes style the two elements while interest is shown.
Syntax
<button interestfor="id">
Values
- idThe id of the element to show when interest is shown in the invoker.
Applies To
Example
Browser Support
The following information will show you the current browser support for the HTML interestfor attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.
Desktop





Tablets & Mobile





