Let's settle the age-old debate: Is HTML truly a programming language or not? Join the discussion to explore the essence of HTML, dissect its features, and uncover the reasons behind its classification as a markup language rather than a traditional programming language.
This week's discussion series is dedicated to helping beginners on their coding journey by addressing common doubts and misconceptions. We will delve into fundamental concepts, explore essential tools, and shed light on industry practices, providing clarity and guidance to those who are new to coding. If you're an experienced developer, your valuable insights, explanations, and best practices are highly encouraged and appreciated to support and mentor aspiring coders!
Follow the CodeNewbie Org and #codenewbie for more discussions and online camaraderie!
Image by brgfx on Freepik
Top comments (34)
Hyper Text Markup Language.
It's a markup language - it's in the name
What's your take on Structured Query Language? Are SQL and HTML subsets of the wider programming language concept (this is my take), or are they disjoint? If so, then SQL isn't a programming language either... discuss 😁
Some dialects of SQL are Turing Complete, such as PostgreSQL (wiki.postgresql.org/wiki/Cyclic_Ta...). I'd consider those dialects of SQL to be programming languages, but others I would not. If it is Turing Complete, then you can express any computable function with it. So for me, any language that is Turing Complete qualifies as a programming language.
Does something need to be Turing Complete to be a programming language? There are some who would answer this with a "yes." I'm not one of them. There are some languages that are almost Turing Complete, other than that they require a bound on number of iterations of loops. The BlooP language of Douglas Hofstadter from his book "Gödel, Escher, Bach" specifies bounds on loop iterations. Its name means Bounded Loop. Because of those bounds, it is not Turing Complete. However, I would consider it a programming language.
Now for HTML.... I don't consider it a programming language. It is not Turing Complete, but as above, that alone (for me) doesn't eliminate it. What is its purpose? To specify structure of content. What else can you do with it? Not much else by itself.
The combination of HTML + CSS is sometimes claimed to be Turing Complete. When you look closer at such claims, it is really the combination of HTML + CSS + user interaction that leads to Turing Completeness. To me, requiring presence of a person is cheating, even if all they are doing is clicking on stuff. Without that clicking, you don't have iteration. If HTML + CSS had some limited form of iteration, like that of BlooP, I'd consider it a programming language.
But they said it's in the name 😂, if we're to go by their initial logic
@joshuaamaju I said nothing about its name. That was @psypher1. But he is not wrong. The M in HTML gets across its purpose, which is not programming. It isn't trying to be a programming language.
So I guess JavaScript isn't a "real" programming language like people think about scripting languages, because it has script in its name 😏
JavaScript is Turing Complete. It is just as much a programming language as any other Turing Complete language, like C, Java, Go, etc.
I know that, but if we're to go by your logic of "it's in the name", then JavaScript isn't a "real" programming language. So maybe it's not just the name
I never said anything about its name in my opinion. That wasn't my logic.
But you said the person that used that logic is right, which means you agree with that logic
No. I agreed with the essence of that comment that its name implies that it isn't intended to be a programming language. But some things can be used for purposes other than intended. Few people would consider the game Minecraft to be a programming language. It is not its purpose. However, it is Turing Complete. So in theory you can use Minecraft as a programming language. Does that make Minecraft a programming language because you can use it as one? I want to say "no", but it meets any functional definition of "programming language" that I can come up with.
My opinion on why HTML is not a programming language goes beyond its name. See my earlier comment on why the combination of HTML + CSS is almost a programming language.
Agreed
Is it a coding language? Maybe; depends on your definition of “coding.” Is it a programming language? No. It kinda doesn’t matter, these are all tools to get accomplish our work. It’s all hammers and duct tape to me. Some tools ratchet and some tools don’t.
At the end of the day, though, I feel like most folks who have strong feelings about this distinction are telling on themselves and their own insecurities or sense of unearned superiority.
Is this not just a distracting word game? Is this a table or a chair?
That can be used as either a table or a chair (or as a step stool). It was likely intended to be one of them. It has the characteristics necessary to be used as any of them.
And debate around that would seem to be, a distraction at best, a waste of time at worst and likely, contain doses of ego and entertainment. Which was the point of the analogy.
There are people who research formal languages for a living (not me). I prefer not implying that someone's work is a waste of time, or for that matter what someone chooses to debate. That type of opinion is best kept to oneself. Sometimes what someone views as time wasting, another finds a useful "distraction".
I doubt that most people who research formal languages don't spend any effort discussing whether a markup language is a programming language or not. Perhaps they do? But I suspect not. It's moot point, and not one with resolution.
Far more interesting is a similar boundary question, are viruses alive? Biological ones not computer ones. Though oddly, as interesting as it is it immediately makes clear that the answer lies very simply in the chose definitions of the categories alive and not-alive. And I choose that example because defining those is of deep interest to many people (as they feel themselves to be alive, a rock not and are intrigued by the boundary)but also not to most as it is simply moot.
Do take not however that there is no dismissive insult in suggesting sometimes is a distraction, nor that people engage in conversations for entertainment (or, stimulation if you prefer), including professionals research categories and boundaries, specific or general. Nor is it uncommon to find less noble motivations ins such discussions.
I wasn't bothered by "distraction." Distractions can be good. It was the "waste of time" that is harsh.
I did write "at worst" as a qualifier. Surely, at worst, most things might receive a slightly or very harsh description? It is after all the superlative, and used in fact primarily to constrain the degree of judgement. That is, at worst, it's a waste of time, it could conceivably be any worse, in case you were worried ... And eating time is not to my mind very harsh, we all do it from time to time, inadvertently or even deliberately.
Distracting from what?
Using HTML. And well, anything more useful. Unless of course it has entertainment value or ego stroking power, two big motivaters to dive into labelling debates.
We are categorising creatures I guess and drawn to categorising but can lose good time trying to squeeze outliers and boundary items neatly into categories we've invented, when we could among other things get on with better things or, and this one is often overlooked, define a new category or categories.
Of course the astute reader will spot that this side conversation fits that same description. That is, it might not be the best use of our time.
That said, I often find the meta themes, the "why are you asking?", "what do mean by ...?" etc more interesting than the question on the table.
For example, I certainly teach my children and others that science is less about finding answers than it is about asking the right (good) questions.
The cynical might observe that this conversation could be an attempt to keep people on this platform by introducing 'hot topics'.. those of us who hope Ben wouldn't stoop to that sort of tactic (please don't Ben!) may also think that this could be a way to introduce your exact points above to the coding 101 audience 🙏
Not wanting to push the philosophical conversation too far (we may be accused of going off topic, heaven forbid 😉), I wish we were less of a 'categorising creature', since a lot of the boundaries we invent are not very useful and often actively harmful (generation X anyone?) creating in-groups and out-groups, them and us... I'll stop now!
Haha, Ben you do like poking trolls eh?
It's a funnel of abstraction - electrons and quantum mechanics at the most concrete, Excel at the most abstract (I'm joking, maybe something like Human-Computer-Interaction design at the top, or C4 architectural designs). HTML? it's towards the abstract in the textual & declarative categories, along with the CSS. Quite near SQL.
There are professors who study this stuff: researchgate.net/publication/22011...
Merriam-webster defines programming as: "the process of preparing an instructional program for a device (such as a computer)" - the language you use to provide those instructions is by definition a programming language: this could be encoded text (eg: ASCII), visual (eg: barcodes), audible (eg: 'Hey siri'), physical (eg: up, up, down, down. left, right, left, right, B, A, start - sadly gone: npr.org/2020/02/26/809622331/kazuh...)
If you need a laugh - go search out some programming language alignment charts... 😉
Hi Ben,
This is a very debatable topic depending on who you speak to. HTML is mostly the first thing any computer programmer/ Web developer learns about and hence becomes the first "language" for every beginner programmer.
Personally, I wouldn't really classify it as a programming language 😅.
Career Foundry has some wonderful answers
Yes, semantically, by definition; I have seen the video that @lionelrowe suggested, HTML IS a Programming Language (Imperative vs Declarative) - Computerphile, but I believe my reasoning is different.
A programming language, or programmeringsspråk, is:
HTML is all ov those things.
<html>
,<h1>
,<p>
; it even has entities,
.<p><b>Hello, </p>world</b>
; an opening tag must have a closing tag, so a<p>
must eventually be accompanied by a</p>
.A little bit... We can't do logic stuff in HTML. CSS you could do basic maths.
HTML for structuring just like drafting a drawing first and CSS for styling just like applying ink or paint in a drawing.
Hey everyone. As a passionate programmer and tech enthusiast, I'm thrilled to dive into discussions here! I specialize in (mention your programming expertise, e.g., web development, Python scripting, etc.), and love exploring new technologies and solving challenges.
(goodsresponse.com/21appropriate-wa...)
Yes it is a programming language, it's just not "Turing Complete".
It's a declarative language that tells a computer to do something.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.