There seems to be a recent surge in the "HTML is/isn't a programming language" discussion.

While there are a lot of honest misconceptions and also outright bullshit, I still think if we allow for some nuance there is a meaningful discussion to have about it.

My two cents 👇
First, to be bluntly clear, if a person is using this argument to make a judgment of character, to imply that someone is lesser because of their knowledge (or lack of) about HTML or other skills of any nature, then that person is an asshole.

With that out the way...
Why is this discussion meaningful at all?

If you are newcomer to the dev world and you have some misconceptions about it, you can find yourself getting into compromises you're not yet ready for, or letting go options you could take.
I will argue that HTML is not a general-purpose programming language, for a very concise definition that I think most devs can agree with.

On the other hand, programming languages are but one part of the whole tech stack, and not necessarily the most relevant one at all times.
One argument that is often held is that HTML is not Turing-complete. That's true, but it's also unrelated.

LaTeX is also Turing-complete and I will argue that is not a programming language in the same sense as HTML.

So, why is HTML not a general-purpose programming language?
It has to do with the intended semantics of the language's building blocks.

A programming language describes *behaviour*, understood as the process of mutating data to compute a desired output from a given input.

Under this definition, HTML is not a programming language.
It's a matter of semantics.

HTML is not intended to describe behaviour, it's intended to describe content.

There is nuance, because the frontier between data and behaviour is fuzzy, and you can interpret data as behaviour, but again this requires agreeing upon the semantics.
On the other hand, there is *some* behaviour that is implied in HTML semantics.

Take for example the <form/> tag. It describes a behaviour involving an HTTP request to a given endpoint with a data payload.

But this behaviour is domain-specific, and for a quite narrow domain.
For these reasons I argue that HTML cannot be objectively considered a general-purpose programming language in any sensible definition of programming language.

That doesn't make it any less relevant, or the ones who master it any less skilled.
HTML is a fundamental component of the web, which is arguably one the most important inventions of the last century.

And HTML is tremendously complex to do right, as anyone who's ever tried can witness.

Anyone skilled in it deserves as much appreciation as with any other skill.
You can follow @AlejandroPiad.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.