HyperText Markup Language, or HTML for short, is essentially the language of the Web. It is, as the W3C states, “the language for describing the structure of Web pages.”
Going deeper, the W3C states that
HTML gives authors the means to:
- Publish online documents with headings, text, tables, lists, photos, etc.
- Retrieve online information via hypertext links, at the click of a button.
- Design forms for conducting transactions with remote services, for use in searching for information, making reservations, ordering products, etc.
- Include spread-sheets, video clips, sound clips, and other applications directly in their documents.
With HTML, authors describe the structure of pages using markup. The elements of the language label pieces of content such as “paragraph,” “list,” “table,” and so on.
The basic question here is whether this qualifies as a “programming language”. In order to answer this question, we need to know what a programming language is.
At the basic level, a “programming language” can be understood as any language that tells a computer what to do in terms of processing some information.
More specifically, it is
A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. [From Webopedia.]
So we see it’s primarily an annotative language, used to describe how text on a page looks. It doesn’t really tell the computer or program to do anything in particular, in the sense typically meant.
However, there is not always a consensus. Some people throughout the computing fields disagree with this definition, and frankly I wouldn’t put down their positions, either, very quickly. They often have surprisingly good arguments.
For example, in a 2008 thread at StackOverflow titled “Is HTML considered a programming language?”, two very good answers were written regarding this topic.
YES, a declarative programming language.
[. . .]
Any instruction that tells the computer to do something is a programming language. So even after all these years, I still stand by my answer. HTML is a programming language. Something that isn’t a programming language would be XML.
No, HTML is not a programming language. The “M” stands for “Markup”. Generally, a programming language allows you to describe some sort of process of doing something, whereas HTML is a way of adding context and structure to text.
I find these distinct concepts quite interesting. I personally agree with the latter post. After all, if you’re going to call anything that “tells the computer to do something” a programming language, then I suppose by that defintion you could very well call everything a programming language.
This is because
- Anything can, perspectively, be viewed as a computer system of some sort, whether biological, mechanical, digital, or otherwise, and
- Everything in existence is determined by causality (that is, cause-and-effect), which by definition is something that directs matter to do something.
So, to me anyway, it seems way too semantic to be an accurate definition for this term.
All-in-all, there really is no set-in-stone, established definition we can use here. In the computing fields, there is a large number of various categories of code, and what constitutes some as one type and others as other types is not always clear or even agreed upon.
But, given these limitations, I see the No answer as much more structured. Thus, it could be seen as more realistic in this context because the added resistance-to-change in its meaning gives it greater reliability. However, definitions very often can and do change over time as new information, layouts, and usages are formulated and become more mainstream within a community.
Nevertheless, using this given premise, we can conclude that, at least for now, HTML is not a programming language, but is in fact a markup language.
- W3C: Definition of HTML: “HTML & CSS”
- Webopedia Entry: “What Is Programming Language?”, by Vangie Beal
- Chris Pietschmann’s Yes Answer on StackOverflow:
- brian d foy’s No Answer on StackOverflow:
- StackOverflow Content: Originally posted on StackOverflow, a site hosted by (but not necessarily endorsed by) Stack Exchange.
Released under an Attribution 3.0 Unported (CC BY 3.0) license.
No changes were made except for the insertion of ellipses to indicate the omission of irrelevent intermediate text.
- Image Credit: Dominic Alves
Released under an Attribution 2.0 Generic (CC BY 2.0) license.
Image has not been changed.