CSS Diner

No worries, you've got this!

You're about to learn CSS Selectors! Selectors are how you pick which element to apply styles to.

Exhibit 1 - A CSS Rule

p {
   margin-bottom: 12px;
}

Here, the "p" is the selector (selects all <p> elements) and applies the margin-bottom style.

To play, type in a CSS selector in the editor below to select the correct items on the table. If you get it right, you'll advance to the next level.

Hover over the items on the table to see their HTML markup.

Get help with selectors on the right! →

Ok, got it!
Help, I'm stuck!
style.css
CSS Editor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
+
enter
{
/* Styles would go here. */
}

/*
Type a number to skip to a level.
Ex → "5" for level 5
*/
table.html
HTML Viewer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

What is this?

It's a little game to help you learn CSS selectors. Type in the correct selector to complete each level. Get help on the right.

It's a work in progress, so please give me feedback!

Made by @flukeout with special thanks to...

@k88hudson, @antlam7 and @smashman2004.

Please submit issues and PRs at this Github repo.

< >