Demos
Built from HTML and CSS alone
Each demo is a small program made from nothing but HTML and CSS: HTML holds the state, and CSS decides what follows. Each has its own page, with how it works and the one thing it proves.
All the demos
-
Logic gates
AND, OR, NOT and their relatives, the building blocks of every digital circuit, wired up with checkboxes.
HTML holds true and false; CSS combines them.
-
FizzBuzz
The classic programming interview question: count to 100, saying "fizz" for multiples of 3 and "buzz" for multiples of 5.
CSS can count and test divisibility.
-
Sieve of Eratosthenes
An ancient method for finding prime numbers, by crossing out the multiples of each prime in turn.
CSS can carry out an algorithm, given a fixed range.
-
A quine
A page that shows its own source code, and nothing else.
CSS can reproduce the document it styles.
-
Adding machine
Set two binary numbers with switches, and CSS adds them up, carries and all.
HTML and CSS can compute 2 + 2.
-
Rule 110
A row of cells that rewrites itself by one simple rule, which mathematicians have proved can compute anything.
With a person clicking, HTML and CSS can compute anything.
-
Noughts and crosses
A two-player game that takes turns, refuses illegal moves and spots a win or a draw.
Decisions and memory together make a game.
-
Knight's tour
Move a knight so it visits every square of the board exactly once.
Checking an answer takes a few rules; searching for one takes far more.