This tutorial is for members only

Learn Straight from the Experts Who Shape the Modern Web

200+
In-Depth Courses
21
Learning Paths
Industry Leading Experts
Live Interactive Workshops

:has() is more than a parent selector

Kevin Powell
Kevin Powell Media Inc.
CSS
July 9, 2025

The :has() pseudo selector allows you to select the parent of a specific element very easily. But it can do so much more!

🔗 Links
:has() browser support: https://caniuse.com/css-has
:nth-child browser support: https://caniuse.com/css-nth-child-of