Pseudo-classes Playground

The Sanggar’s work sheet on the bamboo frame: write a selector, then hover, Tab and tick right on the page, and every element shows the states the browser…

Why it matters

Hover, a focus ring for keyboard users, zebra rows, form validation, "a card that has a picture": all of it with CSS alone, with no JavaScript adding and removing classes.

The key idea

States can be selected too, and :has() looks inside

Common mistakes

Try it in this playground