::target-text
The ::target-text
pseudo-element allows you to style text highlighted by a URL text fragment such as #:~:text=snippet
.
Status
Baseline Newly Available (since 2024-12-11)
This feature is expected to reach Baseline Widely Available status on: 2027-06-11
MDN documentation
Specifications
Browser support
- Chrome 89 Released on 2021-03-02
- Chrome Android 89 Released on 2021-03-02
- Edge 89 Released on 2021-03-04
- Firefox 131 Released on 2024-10-01
- Firefox for Android 131 Released on 2024-10-01
- Safari 18.2 Released on 2024-12-11
- Safari on iOS 18.2 Released on 2024-12-11
Developer signals
- State of CSS 2025: reading_list/reading_list question
- State of CSS 2025: features/all_features question
Usage (according to Chrome Platform Status)
~0.045% of page loads. More data at chromestatus.com.
Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist