Is HTML a programming language?
It's one of the internet's longest-running arguments. Rather than pick a side, this site sets out what programming means, tests HTML and CSS against it, and lets the demos speak for themselves.
Introduction
The great HTML debate
Ask whether HTML is a programming language and you'll rarely get a calm answer. Designers, developers and engineers have argued over it for years, mostly on social media, and mostly without agreeing what the question means.
Some of it is trolling, and some of it is gatekeeping: a way of deciding who counts as a programmer. Underneath, though, is a good question. Where does describing something end, and programming it begin?
HTML is only half of the story. CSS has quietly learnt to choose, count and calculate, and the two together can do things that neither can do alone. So this site looks at each in turn, then at what happens when they meet.
You won't find a simple yes or no at the end. You will find the tests people use, the evidence for each, and enough working demos to make up your own mind.
The case
Five parts One question
Each part builds on the one before. We agree on the tests first, try HTML and CSS against them separately, then put them together and see how far they go.
-
Part 1
What counts as programming?
Before we can say whether HTML is a programming language, we have to agree what one is. There is no single definition, so we set out the tests people actually use, and measure everything after against them.
Read part 1 -
Part 2
HTML on its own
What HTML can do with no help at all: structure, meaning, and more built-in behaviour than its reputation suggests. And what it plainly cannot do.
Read part 2 -
Part 3
CSS on its own
CSS is usually treated as decoration. Look closer and you find rules that choose, count, calculate and react, with more arriving every year.
Read part 3 -
Part 4
HTML and CSS together
HTML holds the state and CSS reads it and decides what follows. Together they can do real, if limited, computation, and the demos prove it.
Read part 4 -
Part 5
The verdict is it depends
The answer changes with the test you choose. Here is how HTML, CSS and the two together score against each one, and why the honest conclusion is undecided.
Read part 5 -
Further reading
Sources
The articles, talks and definitions behind the debate: who said what, and which side they came down on.
See the sources
The rules
Zero JavaScript
Everything on this site, from the menu to the demos, is built from HTML and CSS. Your browser is told to refuse scripts outright, and the site won't even build if one slips in. The site itself is part of the evidence.
-
The menu
On a phone, the menu opens and closes with HTML's
popoverattribute. No script toggles it. -
Light and dark
The colours follow your device's setting through a CSS media query, so there's no switch to remember.
-
The demos
When a demo has something to remember, it's in a checkbox or a radio button, and CSS decides what happens next.