DevToolsHub Free · Fast · 100% in your browser

CSS Selector Game

Write a CSS selector that targets exactly the highlighted elements. Twelve levels from type selectors to :not() and attribute matching.

Solved0 / 12

Select every button


        

Legend: target matched target matched but not a target

About this CSS selector game

Learn CSS selectors by writing a selector that targets exactly the highlighted elements. Levels progress from element and class selectors through child, sibling and attribute selectors to pseudo-classes like :nth-child, :not and :has.

How to use the CSS Selector Game

  1. Look at the highlighted elements and the HTML.
  2. Type a selector that matches only those elements.
  3. Pass the level and move on to the next.

Example

Select every other list item  →  li:nth-child(odd)

Frequently asked questions

What is the difference between > and a space?

A space matches any descendant; > matches only direct children.

Is :has supported?

Yes. :has() lets you select a parent based on its children and is supported in all modern browsers.

Is my data safe?

Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.

Is it free?

Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.

An unhandled error has occurred. Reload ✕