Favorites

HTML interestfor Attribute

interestfor
HTML AttributeThis attribute is supported in some modern browsers, but not all.
Updated 22nd November 2026

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.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

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

<button interestfor="tip">Hover or focus me</button>
<div id="tip" popover="hint">A tooltip opened by interest</div>
Open in editor

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.

This attribute is supported in some modern browsers, but not all.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.