Suggest an editImprove this articleRefine the answer for “What does the :has() selector do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`:has()`** is a CSS selector that selects an element if it contains the specified element among its descendants or siblings (a "has" selector). **Key point:** it lets you style an element based on what is inside it, for example a card only if it contains an image.Shown above the full answer for quick recall.Answer (EN)ImageThe `:has()` selector in CSS selects an element if it contains, among its descendants or siblings, the specified element. It is a "has" selector. For example, you can style a card only if it contains an image.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.