Skip to main content
Photography of Alvaro Montoro being a doofus
Alvaro Montoro

Avid Reader

Illustration of a astermind board

CSS Mastermind

html css showdev codepen

Mastermind is a challenging code-breaking game that turns 50 this year. There are 6 colors and a 4-length code to decypher. Can you break the code?

This Mastermind game was developed using only CSS and HTML (no JavaScript), and it has 4 different codes to guess.

Here is the game on CodePen:


Thanks to @racascou for the design suggestions, and @Fionna for a great confetti effect (that I modified a little 😳)

Article originally published on