What is CSS Diner?
CSS Diner is a game for learning CSS selectors. Each level shows a table set with plates, bento boxes, apples, oranges and pickles, and a short task at the top such as "Select the plates". You type a selector into the CSS editor and press enter. If it picks exactly the right items you move on to the next level; if not, the items you picked shake and you try again. Hover over anything on the table to see its HTML in the viewer next to the editor.
It was made by Luke Pacholski, who goes by flukeout, and the code is open source on GitHub. There are 32 levels. They start with simple type, ID and class selectors, then move through descendant, sibling and child combinators, pseudo-classes like :first-child, :nth-of-type, :empty and :not(), and finish with attribute selectors. A help panel on the right explains each selector with examples, and you can type a level number to jump straight to it.
Main Features
- 32 levels, from type selectors to attribute selectors
- A CSS editor and an HTML viewer side by side
- Hover over the table to see each item's HTML
- Help text and examples for every selector
- Covers :nth-child, :nth-of-type, :not() and more
- Jump to any level from the level menu
- Progress saved in your browser, with a reset button
How to Get Started with CSS Diner
- Open flukeout.github.io in your browser.
- Read the task at the top, like "Select the plates".
- Hover over the table to see the HTML of each item.
- Type a CSS selector in the editor and press enter.
- Clear the level and keep going until you finish all 32.
CSS Diner Pricing
CSS Diner is free to play. There are no ads, no paid plan and no sign up needed.
Who Should Use It?
- Beginners learning CSS for the first time
- Web developers brushing up before an interview
- Teachers who want a classroom coding warm-up
- Testers who write CSS selectors for automation
- Anyone who likes short puzzle levels
CSS Diner Alternatives
- Flexbox Froggy is a free game that teaches CSS flexbox with frogs and lily pads.
- Grid Garden teaches CSS grid by having you water carrots across 28 levels.
- Learn Git Branching teaches Git with a live commit tree you change by typing commands.
Frequently Asked Questions
Is CSS Diner free?
Yes. CSS Diner is free with no ads and no paid plan. You can start playing right away.
How many levels does CSS Diner have?
There are 32 levels. They go from simple type selectors up to attribute selectors like [attribute^="value"].
Do I need an account?
No. You do not sign up. Your progress is saved in your browser, and you can reset it from the level menu.
Who made CSS Diner?
CSS Diner was made by Luke Pacholski, known online as flukeout. The game is hosted at flukeout.github.io and its code is on GitHub.
