> you should master the HTML programming¹ language
The footnote reads:
> 1. This is a common debate - but for simplicity sake I'm just calling it this.
It's not really a debate, HTML is a markup language [1], not a programming language: you annotate a document with its structure and its formatting. You are not really programming when you write HTML (the markup is not procedural) (and this is not gatekeeping, there's nothing wrong about this and doesn't make HTML a lesser language).
To avoid the issue completely, you can phrase this as: "you should master HTML" and remove the footnote. Simple, clean, concise, clear. By the way, ML already means "Markup Language", so any "HTML .* language" phrasing can feel a bit off.
Of course HTML is a programming language. It's one of the languages I use every day to program with. I'm not sure what the definition of a programming language would be beyond that.
Do you mean "Turing-complete" language? Or maybe "procedural programming language"? I agree HTML isn't either of those, but those aren't the be-all and end-all of programming now, are they?
I, and most of us, mean a language in which one can express a computer program, which is a set of instructions for a computer to execute. You don't execute an HTML file, you display it, render it. You can't implement fizz buzz in HTML. At best, you mark up its output. With HTML, you don't instruct, you describe. You instruct what to do with JavaScript, or Python, or whatever programming languages you use client or server side.
A programming language doesn't need to be procedural, it can be functional, or use another computationally equivalent paradigm. I'm not quite sure it needs to be Turing complete, but possibly.
A programming language lets you express to some processor that provides a set of computation primitives what to do with the memory cells you have at your disposal, and in general it lets you deal with input and output.
If you consider any language you program with to be a programming language, then CSS, JSON, YAML, XML, markdown (that's what your readme is likely written in) and even English (that's what you use to express the specs, the bugs, maybe your notes / drafts, the comments, possibly the language the singer of the songs you're listening to while programming use) or UML need to be programming languages too. That's not quite useful. "Program with" is too large and would make the "programming" qualifier largely useless.
An HTML file is a set of instructions to execute. They're very high-level, declarative instructions for describing a UI, similar to how SQL is high-level declarative instructions for describing a set of data to be loaded, or how Prolog is a high-level declarative set of instructions for describing a set of logical axioms, but they're still instructions. You pass them to an execution engine, and on the basis of the instructions you've written, the engine does something. (See e.g. the section on fourth generation PLs in the second link you gave.)
More broadly, I think this discussion is a stupid one. There is no formal, mathematically precise definition of a programming language. There are formal definitions of lots of PL-related things, and for what a language is in general (a combination of syntax and semantics), but there's no formal definition of the term "programming language" that's useful here.
So if we're not arguing about a formal definition, then we're arguing about essentially our favourite dictionaries, and how we personally interpret our favourite dictionaries. And that's just not a useful argument at all, it's not even how dictionaries are meant to work! And yet whenever someone dares to write "HTML programming language" or something similar, there is always a comment from someone demanding that the author use their personal dictionary, and correct their changes. And it is deeply grating, because whenever I see this happen:
* The original statement is never ambiguous. I have never seen a situation where referring to HTML as a programming language has ever caused some sort of confusion.
* The discussion about whether HTML is a programming language is almost always completely irrelevant to the topic at hand, and bringing it up adds no value to the discussion.
* The author's definition is usually inconsistent anyway. Which isn't a problem — I don't imagine my mental definition of a programming language is entirely consistent either — but it's dumb watching someone try and correct other people without understanding their own definition enough to be able to respond to clarifying questions.
In your original comment, you said "it's not really a debate", and that's completely correct. It's not a debate because there's no right answer. There's not even any value to a right answer. The matter is entirely a question of terminology. And if different choices of terminology make things unclear, then it might be worth clarifying that terminology, but here I don't think the author could have been any clearer at all about what they were trying to communicate.
> More broadly, I think this discussion is a stupid one
Mostly agree (although reasoning about these things can be interesting). More on this at the end of the comment.
> So if we're not arguing about a formal definition, then we're arguing about essentially our favourite dictionaries
It's also a matter of the most widely accepted definitions, not just what definition one prefers. And it seems to me not considering HTML as a programming language is what's most accepted and for good reasons.
We need a common understanding to communicate.
> I don't think the author could have been any clearer at all about what they were trying to communicate.
They just make their expression more confusing and more complicated by needlessly qualifying HTML and putting this footnote when they could have skipped both the footnote and the qualifier.
Here I was in fact mostly concerned about the clarity and the presentation. That page seems to be written for newcomers, qualifying HTML as a programming language doesn't seem quite optimal given the (supposed) target, I think it would do a disservice to someone who has not a great understanding of those things.
So the better way of exposing things IMHO is just not mentioning it at all, and if someone wonders whether HTML is a programming language, they can do their own research.
> An HTML file is a set of instructions to execute
I believe it's a stretch to describe HTML like this. Your explanation makes it work, but I don't think it's a usual way of viewing HTML. In any case it seems to me presenting HTML like a set of instruction to execute to a newcomer would just be weird.
Now, this discussion wouldn't matter much between people who have such a clear understanding of these things as you. When everything is this clear, deciding whether HTML is a programming language is indeed a purely intellectual exercise that can totally feel pointless and where both positions are probably reasonable depending on the perspectives, and yes, on the exact, clarified definition one uses.
So I was wrong: there is a debate. It was incautious of me to state otherwise. And the debate is mostly pointless for whoever clearly understands the involved concepts. And I should have focused on the pedagogical aspect of this stuff, not on whether it's wrong.
I will definitely handle such a discussion differently next time, if I don't outright skip it.
What happens if I simply add an iterator mechanism to HTML (well, I guess we need variables too)? Is it no longer a markup language here (I won't add anything else):
<for i=0; i<1; i++>
<html>
</html>
</for>
Better question, why don't we upgrade XML to do that?
But if you disagree with this, or somehow work around this statement by replacing your for element with some "for-loop" custom element (it is valid HTML to add custom tags with dashes in their names), my stronger argument is at https://news.ycombinator.com/item?id=46743219#46743554
I ask you then: (1) how do you deal with the template that surrounds a large number of pages on a site? (2) how do you deal with the fact that the average web form might want to display something different based on the form contents (e.g. redraw the form if there's an error, draw something different on success?) (3) do you write anything that returns JSON or other results for AJAX or web services?
(1) It's a problem if you have 2 or 3 (never mind N where N is large) different web pages that have the same stuff at the top of the bottom. I mean you can have
<?php include("header.php") ?>
... body ...
<?php include("footer.php") ?>
but...
(2) ... in either case it is just as easy to write
<?php
... some "router" that tests $_GET, ... to set $body_file ...
include("header.php");
include($body_file)
include("footer.php");
?>
where you have the option of putting headers on before you include header.php, showing a different header
or footer conditional, etc. This approach is structurally stable and scales with the complexity of your
application no matter what you're doing...
(3) ... for instance say you want to write a page that might return a different format depending on the headers, the router can return JSON if that is called for, or XML if that is called for, or HTML inside the site's global template if that is called for.
I'll use (1) for when I have a restricted set of pages (say, the usual pages of a site, like home, contact, about ...); body is not in a separate file; and (2) when the number of page is dynamic, say, a site that displays recipes stored in markdown files.
(3) I don't know yet for sure how I'd do it today (I will soon normally), I suppose I would just write different scripts, that can call some shared code. For APIs, people expect something that looks like REST endpoints and I suppose I would return JSON or XML in REST endpoint, but the URL structure that looks good for REST wouldn't for a normal page.
If HTML was never able to be the full solution, then I guess if I had to expand on where I'm going, then what the heck are we even doing with this html thing? Either MAKE IT like PHP, ditch it, or do something, anything.
HTML is perfectly able to do what it was designed for: mark up documents.
There still needs to be something like HTML even when you have PHP: PHP is something you run on the server and it still needs to output something to the client in some format, and HTML is adequate for this.
The heck we are doing with HTML is taking it for building client apps. But even then, you now have UI toolkits that mimic this model: QML, whatever XML format Android has to design UIs, etc.
> Either MAKE IT like PHP, ditch it, or do something, anything.
Do nothing so I can make websites that are accessible, secure, static and fast. HTML is the full solution unlike PHP or JS. With CSS it’s Turing complete.
I dunno, you're being pedantic :) Yes yes, the name clearly ends up "Markup Language" so yeah, with a very strict definition of programming languages, HTML is not one of them.
But if we use a broader definition, basically "a formal language that specifies behavior a machine must execute", then HTML is indeed a programming language.
HTML is not only about annotating documents or formatting, it can do things you expect from a "normal" programming language too, for example, you can do constraints validation:
That's neither annotating, just a "document" or just formatting. Another example is using <details> + <summary> and you have users mutating state that reveals different branches in the page, all just using HTML and nothing else.
In the end, I agree with you, HTML ultimately is a markup language, but it's deceiving, because it does more than just markup.
It might be, I'm usually not, but this is all xhtml.club and this footnote are about, might as well be correct :-)
Constraint validation is still descriptive (what is allowed)
All details and summary are doing is conveying information on what's a summary and what's the complete story, and it has this hidden / shown behavior.
In any case, you will probably find something procedural / programming like in HTML, but it's not the core idea of the language, and if you are explaining what HTML is to a newbie, I feel like you should focus to the essential. Then we can discuss the corners between more experienced people.
In the end, all I'm saying is: you can just avoid issues and just say "HTML" without further qualifying it.
This is not what HTML does. Tags are not instructions, they delimit the start and end of elements. They describe content, they do not specify behaviour.
In your pattern example, that is still just a description of what is acceptable input. It doesn’t execute anything. A paper form might specify the format DD / MM / YYYY but that doesn‘t mean the form is executing a program in your brain when you fill it out.
I'm not sure we can call your parent comment pedantic. They're just being correct. Is it pedantic to say that fish is not a fruit? It's just correct to do so.
If anything, it is the act of stretching the definition of "programming language" so much that it includes HTML as a programming language that we should call pedantic.
One threshold is "can you write a program that might not complete?" You can't in SQL, which makes it less of a programming language than, say, FORTRAN.
If you look at the HTML 5 spec it is clear that it's intended to be a substrate for applications. The HTML 5 spec could be factored into a specification of the DOM, specification of an x-language API for the DOM and a specification for a serialization format as well as bindings of that x-language API to specific languages like Javascript.
Back when it was fashionable to complain about how every Electron application has 30 MB of bloat I did an eval of all the options for x-platform applications that weren't Electron and came to the conclusion that "they all sucked" except for maybe JavaFX -- and not everybody likes Java as much as I do.
Building up to Win 8, Microsoft pushed for grid and flexbox which are the bees knees for laying out applications in HTML.
Compare the annoying nag dialogs in MacOS and Windows. MacOS nags you to buy into Apple Music and other unwanted services with 2025 reskins of the 1999 reskins of the modal dialogs from the 1984 Mac Classic. Windows does the same with ads that look like advertising which I find more visually appealing even if the services are unappealing.
Every time I think about writing a GUI application that's not a web application I think "this is a waste of time" whereas my web applications keep finding new lives as mobile applications, VR applications, etc.
> Back when it was fashionable to complain about how every Electron application has 30 MB of bloat
What, it's not anymore??
And yes, I do end up writing web applications every time too (I haven't bundled them though). I don't want to tie myself to a specific platform, and being able to point users to an URL and bam, they can run the thing, is convenient. I hate that this makes me dependent on tech maintained with Big Tech money though.
I think that it is a debate, and it depends on the role of HTML in your system.
If all you're doing is using HTML to "annotate a document with its structure and its formatting", then yes, I'll accept that it's not quite programming, but I've not seen this approach of starting with a plain non-html document and marking it up by hand done in probably over two decades. I do still occasionally see it done for marking up blog posts or documentation into markdown and then generating html from it, but even that's a minuscule part of what HTML is used for these days.
Your mileage my vary, but what I and people around me typically do is work on hundreds/thousands of loosely coupled small snippets of HTML used within e.g. React JSX, or Django/Jinja templates or htmx endpoints, in order to dynamically control data and state in a large program. In this sense, while the html itself doesn't have control flow, it is an integral part of control flow in the larger system, and it's extremely likely that I'll break something in the functionality if I carelessly change an element's type or attribute value. In this sense, I'm not putting on a different hat when I'm working on the html, but just working on a different part of the program.
Those are not HTML. PHP neither, even when used as a templating language for HTML.
> htmx endpoints
Not really familiar with htmx, but I would say this is HTML augmented with some additional mechanisms. I don't know how I would describe this augmented HTML, but I'm not applying my "not programming" statement to htmx (I probably could, but I haven't given enough thoughts to do it).
> In this sense, I'm not putting on a different hat when I'm working on the html, but just working on a different part of the program.
I agree with this actually. I wouldn't consider that writing HTML (or CSS) is really a separate activity when I'm building some web app.
> In this sense, while the html itself doesn't have control flow, it is an integral part of control flow in the larger system
That's correct but I don't see what it has got to do with the question of whether HTML is a programming language or not.
Strings do not have control flow but strings are integral part of larger programs that have control flow. So what? That doesn't make strings any closer to being programming languages.
It's a question of semantics. What I'm saying is that the way many of us use html in practice in 2026 is less like arbitrary strings and more like db connection strings, where most of our focus is not on whether a bit of text is an article or an aside, but about how it participates in the control flow across different components in our architecture.
From another perspective, I'm not familiar with any present day company, where the html they use in their source code is sufficiently simple and distinct from the rest of the program to be managed by non-programmers. The only html that is just used as strings is that used for individual posts in a crm or marketing tool's cms, typically stored in a database rather than the source code repository.
> you should master the HTML programming¹ language
The footnote reads:
> 1. This is a common debate - but for simplicity sake I'm just calling it this.
It's not really a debate, HTML is a markup language [1], not a programming language: you annotate a document with its structure and its formatting. You are not really programming when you write HTML (the markup is not procedural) (and this is not gatekeeping, there's nothing wrong about this and doesn't make HTML a lesser language).
To avoid the issue completely, you can phrase this as: "you should master HTML" and remove the footnote. Simple, clean, concise, clear. By the way, ML already means "Markup Language", so any "HTML .* language" phrasing can feel a bit off.
[1] https://en.wikipedia.org/wiki/Markup_language