Fun Online Games to Learn Flexbox and CSS

I’m a huge proponent of books, courses, videos, and tutorials to learn something new.

But sometimes it’s much easier to remember a new concept, especially when it comes to CSS or flexbox, through an online game.

Which is why I created this collection of fun online games to help you learn flexbox and CSS.

No more having to bookmark a cheatsheet or wasting your time searching for the correct syntax.

In no particular order, here are some of the free online sites I found.

1. Flexbox Froggy

Level 1 of Flexbox Froggy screenshot shows interface in two side-by-side horizontal parts: one part with CSS code and instructions, the second part displays CSS code results.

Created by CodePip, Flexbox Froggy is one of the more popular games for learning CSS flexbox.

Your task is to bring all the frogs home to their lilypads by writing CSS code, with prompts and descriptions for different properties. With 24 levels, you’ll have a lot of fun challenging your flexbox knowledge.

2. Flexbox Defense

Two pane vertical interface for Flexbox Defense displays code and instructions in one pane with the results of the code displaying in the second pane.

Get ready to battle with Flexbox Defense by moving your towers to prevent enemies from attacking.

Created by Channing Allen, Flexbox Defense has 12 levels to help you learn flexbox, with a helpful ? icon in the stylesheet to remind you how the property works.

3. Flexbox Zombies

An animated figure dressed in dark blue with a hoodie takes aim with their crossbar on some target in the distance, with a storyline and CSS styles below.

A fun story-driven game, Flexbox Zombies with its delightful illustrations and surprisingly true-to-life sound affects will turn you into a flexbox expert with a crossbow.

Did I say crossbow? Yes.

It’s a fun game, free, but requires registration.

4. Grid Garden

Two vertical panes display the CSS Garden interface, with code and instructions in the green-colored pane while the results display in the brown-colored garden plot pane.

Get started growing carrots by writing code in Grid Garden. Want your carrots to grow? Add water or get rid of weeds in your garden.

With 28 levels, you’ll soon become an expert at CSS grid.

5. CSS Diner

A three-pane interface displaying in the left top of interface plates on a table, to the side a listing of selector levels and description, and below the CSS Editor and HTML Viewer.

Get to know your CSS selectors with the 32 levels of CSS Diner. To advance to the next level, enter a CSS selector in the editor to select the items on the table.

Note: I had issues trying to read CSS Diner due to the low color contrast of gray text on black background and gray text on light gray background.

Wrapping Up

Have some fun learning CSS and flexbox with the online games I’ve recommended. If you know of others, share them in the comments.

And if you’re interested in more fun games, , check out CodePip for their JavaScript, HTML, and other CSS games (some require payment).

Photo of author

About the Author

Deborah Edwards-Oñoro enjoys birding, gardening, taking photos, reading, and watching tennis. She's retired from a 25+ year career in web design, usability, and accessibility.