Is HTML a Real Programming Language?

Is HTML a Real Programming Language?

The debate about whether HTML is a "real" programming language is as old as the internet itself. Tim Carmody wrote an excellent essay on the importance of HTML and on why it's absolutely a real programming language. One of my favorite takes on the debate is the super hilarious video Is HTML A Programming Language? At this point I've read dozens of heated debates about this on Hacker News and elsewhere on the Internet. I was even involved in one on Twitter (before X). Suffice to say, it is a controversial topic.

On the one hand, HTML literally instructs a computer—a web browser—about how to display content. On the other hand, HTML alone can't accomplish what you can accomplish with other languages like Python or Java. So which side is correct? The answer is more nuanced than a simple yes or no.

Let's first do a quick primer on how HTML works. HTML stands for Hyper Text Markup Language and it was designed to display documents inside a web browser. The markup is written with what are called tags, essentially the elements of a web page. If you want to display a heading you use an <h1> tag like so: <h1>This is a heading</h1>. If you want paragraph you use a <p> tag.

There’s certainly a bit more to it than this brief overview. There are about 140 tags, some of those tags have additional behavior than just displaying text, but overall the idea is very simple to understand. HTML is mostly text. It’s easy to write, and it’s easy to read.

But is it a real Programming Language Tho?

The short answer is yes. The long answer is yes, but...

The Short Answer

HTML is a programming language by any broad definition: it gives structured instructions to a computer—in this case, a web browser—about how to render and interpret content. Like other domain-specific languages, HTML focuses on a narrow problem space (webpage structure and content). Despite lacking loops, conditionals, or arithmetic operations, it has a formal specification, versioning, and a set of strict rules the browser follows.

The Long Answer

The long answer is the one people get all worked up about on the internet. This is the more nuanced answer. HTML on it's own is not enough to create complete applications. It cannot drive application logic or manage data by itself. It's declarative: you describe the structure and semantics of a page, and the browser interprets that description. This is the critical piece people point to when they say, “HTML isn’t really a programming language”—it simply doesn’t provide the tools to build complete, dynamic applications and systems by itself.

HTML is a programming language, but it's more specifically what's called a domain specific language. Other examples of domain specific languages that you might be familiar with are CSS for styling HTML, and SQL for creating databases. In contrast to domain specific languages we have what are called general purpose languages, and these are languages like JavaScript, C++, or Python.

Yet saying that HTML is “not a real programming language” because it’s domain-specific is an unfair dismissal. Languages like SQL or CSS—are undeniably used every day by professional developers. They, too, on their own, cannot singlehandedly build a complex application, yet they remain indispensable. In much the same way, HTML is indispensable for structuring the content of the web.

No matter how you frame it, you can't build a modern web application with just HTML, and I'm sure that folks like Tim Carmody and others that have argued for the legitimacy of HTML as a real programming language understand this, but HTML works in tandem with CSS for presentation and JavaScript for interactive or dynamic features. Together, they form the cornerstone of front-end development—each language playing a specific role. While HTML describes the “what,” CSS describes the “how it looks,” and JavaScript describes the “how it behaves.” This layered approach is the reason we can create robust, complex, and visually appealing websites.

HTML has definitely revolutionized information sharing by making it easy for anyone to create and publish websites. The democratization is no small feat and it's the reason why the web became so ubiquitous. Unlike most programming languages, HTML is highly tolerant of mistakes—browsers tend to “guess” and correct sloppy markup rather than throw errors. This user-friendliness helped millions of non-developers start creating content online, further blurring the line between “programmers” and “regular users.”

In the end, HTML is a programming language—albeit a domain-specific one. It gives precise instructions to the browser, but those instructions concern layout and structure rather than full-blown program logic. For real-world applications, HTML typically needs help from CSS and JavaScript (or other languages). So is HTML a “real” programming language? Yes, in the sense that it instructs a computer and follows a formal specification. No, if your definition hinges on Turing-completeness or the capacity to handle data-driven logic by itself. Either way, there’s no denying HTML’s foundational importance for the web and its role as an on-ramp for countless programmers.