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.

The Yes post was created by the user Chris_Pietschmann at 2008-09-28T04:01 (UTC):1

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.

On the other hand, the No post was made by the user brian_d_foy way back at 2008-09-28T04:01 (UTC):2

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

  1. Anything can, perspectively, be viewed as a computer system of some sort, whether biological, mechanical, digital, or otherwise, and
  2. 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.


1 Last edited at 2012-06-08T17:54 (UTC).
2 Last edited at 2011-03-02T08:12 (UTC).


Sources

  1. W3C: Definition of HTML: “HTML & CSS”

    http://www.w3.org/standards/webdesign/htmlcss

  2. Webopedia Entry: “What Is Programming Language?”, by Vangie Beal

    http://www.webopedia.com/TERM/P/programming_language.html
  3. Chris Pietschmann’s Yes Answer on StackOverflow:

    https://stackoverflow.com/questions/145176/is-html-considered-a-programming-language/145177#145177
  4. brian d foy’s No Answer on StackOverflow:

    https://stackoverflow.com/questions/145176/is-html-considered-a-programming-language/145179#145179

Other Sources & Licences

  1. 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.
  2. Image Credit: Dominic Alves
    Released under an Attribution 2.0 Generic (CC BY 2.0) license.
    Image has not been changed.
Advertisements

2 thoughts on “Is HTML a Programming Language?—Yes and No.

  1. HTML alone, but when you add CSS? Particularly with CSS3 the argument for a programming language is stronger because it can make things ‘happen’. In fact, I’ve taken to teaching my children programming, and HTML + CSS is the perfect language; it avoids the complexity of conditional flow and complex scope but trains them to understand objects (like HTML elements) and their properties as well as structure. Plus, the results in an editor like Brackets, with live preview, are instant and obvious.

    Liked by 1 person

    1. Yes, but if you want to define an individual thing, one must define the individual thing. If an object is so interconnected with another that it becomes impossible to assign it its own definition, then it no longer qualifies as a “separate thing”. After all, the whole definition of something being separate is that it can be defined independent from other objects.

      So, yes, perhaps HTML+CSS is a programming system, but individually, HTML and CSS both lie closer to the “markup” end of the spectrum than they do the “programming” end.

      __________
      Note: I wasn’t using the italics as an emphasiser, so I apologise if it came off initially as rude.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s