CSS Diner Unblocked

Play CSS Diner online for free in your browser. No download, no sign-up.

CSS Diner gameplay screenshot
  • Partly works on mobile
Report a problem

Turn your phone sideways for a bigger view of this game.

CSS Diner is a hands-on way to learn how CSS selectors work. Each level sets a small table with plates, bento boxes, apples, oranges and pickles, and a short order such as “Select the small apples.” You answer by typing the selector that would target those items in a stylesheet. The table is real HTML, so what you type is tested against actual elements, and you see right away which items your rule grabbed.

How to Play CSS Diner

The items you need to select bounce on the table. Below it, the HTML Viewer shows the markup for the whole table, and the panel on the right explains the selector that level is about, with its syntax and examples. Type your selector in the CSS Editor and press Enter.

If your selector picks exactly the bouncing items, they fly off the table, the level gets a checkmark, and the next one loads. If it picks too many, too few or nothing, the editor shakes and you can try again.

The 32 levels build on each other. You start with element types, IDs and classes, then combine them with descendants, commas and the * universal selector. Next come sibling and child combinators (+, ~ and >), followed by pseudo-classes such as :first-child, :nth-child, :nth-of-type, :only-of-type, :empty and :not(). The last levels cover attribute selectors, including the ^=, $= and *= matches. Clearing level 32 ends the game.

CSS Diner Controls

Controls for CSS Diner
ActionKeyboardMouse
Type a selectorType in the CSS Editor box—
Check your answerEnterClick the "enter" button
Jump to a levelType the level number, then EnterOpen the menu (top right) and click a level
See an item's HTML—Hover over an item on the table or a line in the HTML Viewer
Previous or next level—Click the arrows beside the level title
Close the level menuEsc—

Tips and Strategies

  • Read the HTML Viewer first. The order on top describes the goal, but the markup shows the real tags, classes and IDs you can use.
  • Hover to find the right element. Pointing at an item on the table highlights its line of code, and pointing at a line highlights the item.
  • Count from 1 in nth selectors. plate:nth-child(3) means the third child, not the fourth, and :nth-of-type(2n+3) style formulas skip in steps.
  • Mind the space. plate apple finds apples anywhere inside a plate, while plate > apple only matches apples sitting directly on it.
  • Use the help panel’s examples. They show the exact pattern for that level’s selector, so adapt one instead of guessing.

Features

  • Live HTML view: the table’s markup is shown next to the editor, and hovering links the two.
  • Built-in reference: every level comes with a name, syntax line, explanation and examples.
  • Level menu: jump to any level, see checkmarks for solved ones, and reset your progress.
  • Quick level skip: type a number and press Enter to go straight to that level.

Tested and updated:

CSS Diner Unblocked: FAQ

Does my answer have to match the example selector exactly?

No. The game checks which items your selector grabs. If it selects exactly the items that are bouncing, and nothing else, the level counts as solved, even if you wrote it a different way.

What happens when I type a wrong or broken selector?

The editor or the items you picked shake, and the correct targets keep bouncing so you can try again. There is no penalty, and the game only counts wrong tries in your saved progress until you solve that level.

Is my progress saved?

Yes. Your current level and which levels you solved are stored in your browser. Solved levels get a checkmark in the level menu, and the Reset Progress link at the bottom of that menu clears everything.

Can I use CSS Diner on a phone?

You can type answers with an on-screen keyboard, but the two-column layout is built for wide screens and the hover tooltips need a mouse. A computer gives a much better view of the table and the code.

More Free Games to Play Online