::highlight
Newly availableSince 202695% of users
Targets custom text highlights created via the CSS Highlight API. It allows you to style specific ranges of text programmatically (ideal for search-and-highlight features).
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since March 2026. Widely available around September 2028.
See how modern your own CSS is.Check your CSS →
Quick example
::highlight(search-result) {
/* Styles text found via a search script */
background-color: yellow;
color: black;
}::highlight browser support
BaselineNewly availableSince 2026 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage95%of people can use this5% use a browser without it.
Browsers
105+
149+
17.2+
105+Mobile
105+Android
149+Android
17.2+iOS
Interop 2026 focus area. All major browsers are actively working to fix cross-browser inconsistencies for this feature in 2026. Learn more →