Power Your Software Testing with AI and Cloud

Supercharge QA with AI for Faster & Smarter Software Testing

Next-Gen App & Browser Testing Cloud

:has() CSS relational pseudo-class

The :has selector matches elements that include an element of a specific kind immediately inside. For example, the following rule matches elements that contain an image, i.e. .

Last updated on : 2026-02-09

Browser Versions

IEIE

EdgeEdge

FirefoxFirefox

ChromeChrome

SafariSafari

OperaOpera

5.5 - 11
Test on IE 5.5 - 11 ...
12 - 104
Test on Edge 12 - 104 ...
105 - 144
Test on Edge 105 - 144 ...
2 - 121
Test on Firefox 2 - 121 ...
122 - 150
Test on Firefox 122 - 150 ...
4 - 105
Test on Chrome 4 - 105 ...
106 - 147
Test on Chrome 106 - 147 ...
3.2 - 15.2
Test on Safari 3.2 - 15.2 ...
15.5 - 26.3
Test on Safari 15.5 - 26.3 ...
9.5 - 90
Test on Opera 9.5 - 90 ...
91 - 125
Test on Opera 91 - 125 ...

...Fully Supported

...Partially

...No Support

Specifications

Selectors Level 4 # relational

Syntax

:has( <forgiving-relative-selector-list> )

Browser Compatibility

:has() CSS relational pseudo-class on IE is not supported on any IE versions.

:has() CSS relational pseudo-class on Edge is fully supported on 105-144, and not supported on 12-104 Edge versions.

:has() CSS relational pseudo-class on Firefox is fully supported on 122-150, and not supported on 2-121 Firefox versions.

:has() CSS relational pseudo-class on Chrome is fully supported on 106-147, and not supported on 4-105 Chrome versions.

:has() CSS relational pseudo-class on Safari is fully supported on 15.5-26.3, and not supported on 3.2-15.2 Safari versions.

:has() CSS relational pseudo-class on Opera is fully supported on 91-125, and not supported on 9.5-90 Opera versions.

:has() CSS relational pseudo-class on Safari on iOS is fully supported on 15.5-26.3, and not supported on 3.2-15.2 Safari on iOS versions.

:has() CSS relational pseudo-class on Android Browser is fully supported on 105-144, and not supported on 2.3-104 Android Browser versions.

:has() CSS relational pseudo-class on Opera Mobile is fully supported on 72-80, and not supported on 10-64 Opera Mobile versions.

:has() CSS relational pseudo-class on Chrome for Android is fully supported on 105-144, and not supported on 97-104 Chrome for Android versions.

:has() CSS relational pseudo-class on Firefox for Android is fully supported on 123-147, and not supported on 95-122 Firefox for Android versions.

:has() CSS relational pseudo-class on Samsung Internet is fully supported on 20-29, and not supported on 4-19 Samsung Internet versions.

88
Hightooltip

Overall Browser Compatibility Score

Note::has() CSS relational pseudo-class shows a browser compatibility score of 88. This is a collective score out of 100 to represent browser support of a web technology. The higher this score is, the greater is the browser compatibility. The browser compatibility score is not a 100% reflection for every browser and the web technology support. However, it does give you an estimate on how much you should rely on a particular web technology in terms of browser compatibility.


Test on 3000+ browsers for :has() CSS relational pseudo-class & more

Test your website for :has() CSS relational pseudo-class and other web technologies. Get 100 FREE automation test minutes!

Test Now...

More Web Technologies

  • CSS
  • HTML 5
  • SVG
  • JS API
  • Security
  • JavaScript
  • Other Web Technologies

Did you find this page helpful?

Helpful

NotHelpful

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests