Why HTML is Not a Programming Language

HTML is great. It defines the structure of webpages and it determines how data is displayed online. What you’re looking at right now is HTML code, read and interpreted by your browser. But this doesn’t make HTML a programming language.

A Markup Language

HTML is a type of markup language. It encapsulates, or “marks up” data within HTML tags, which define the data and describe its purpose on the webpage. The web browser then reads the HTML, which tells it things like which parts are headings, which parts are paragraphs, which parts are links, etc. The HTML describes the data to the browser, and the browser then displays the data accordingly.

That’s how the browser knows that

This is a heading

This is a paragraph, and

This is a link

However, this is not programming. The above is not an example of an executable script. The HTML was only used in the above to mark up the text for the browser to read and interpret as web page content. It told the browser which parts where headings, which were paragraphs, and which were links, and the browser displayed them as such. HTML is used for structural purposes on a web page, not functional ones.

Not a Programming Language

Programming languages have functional purposes. HTML, as a markup language doesn’t really “do” anything in the sense that a programming language does. HTML contains no programming logic. It doesn’t have common conditional statements such as If/Else. It can’t evaluate expressions or do any math. It doesn’t handle events or carry out tasks. You can’t declare variables and you can’t write functions. It doesn’t modify or manipulate data in any way. HTML can’t take input and produce output. Think of it this way: you can’t compute the sum of 2 + 2 in HTML; that’s not what it’s for. This is because HTML is not a programming language.

Still Awesome

Unfortunately, coding only in HTML doesn’t make you a programmer. In fact, HTML really shines when you use it in conjunction with an actual programming language, such as when using a web framework. That’s when you can start serving up dynamically created web pages and database applications.

But don’t worry, even with pure HTML, you’re still a coder. You’re writing lines of code in a (markup, not programming) language. You’re essentially codifying information for the web. So while you might not want to put HTML on the “Programming Languages” part of your resume, you should definitely have it under “Skills”, or simply “Languages”.

Knowledge of web page structure is a valuable asset for anyone to have, in IT as well as in other fields, and I’m definitely not trying to discredit anyone’s knowledge on the awesomeness that is HTML. HTML is a core tenet of front end web development and is obviously a major aspect of what the user winds up seeing on their computer screen. With the emergence of HTML5, HTML’s capabilities and opportunities to define and structure web page data have soared to new heights, with a greater emphasis on multimedia, mobile web, geolocation, and more. This makes a solid understanding of HTML even more useful to have.

So keep rocking the HTML, get to know it well, and by all means, code away! Just don’t call it programming.

Still think HTML is a programming language? Think “programming” and “coding” is all just semantics? Let me know in the comments.

Ben Romy

Ben is a 2012 graduate of the iSchool, now working for MLB Advanced Media.

More Posts

  • Holden Fenner

    It is absolutely not a programming language, but it’s worth placing heavy emphasis on how much there is to properly writing it.  HTML provides semantic structure to the webpage which in turn affects search engine optimization and accessibility such as screen readers.  In addition, not all browsers completely implement the markup (or implement it correctly).  You have to decide how to support the latest and greatest shiny WebKit browsers as well as mobile browsers and dinosaurs like IE6.  This can range from deciding not support certain browsers based on analytics to using Javascript solutions such as Modernizr to provide dynamic markup without breaking your whole page.  As well, take a good look at micro-formats.  While not part of the official HTML specification, they make it possible to easily share events, contacts, and other information with other pages/services/applications in a standardized format.  In the front-end developer world, you will go a long way with an understanding of HTML for semantic page structure, CSS for styling, and Javascript/JQuery for page behavior.  Given the variety of screens, browsers, devices, and bandwidth that your page visitors will be using, you will find yourself spending as much time learning the quirks and best practices of the language as you will learning how to write it correctly for the “perfect world.”

  • Aantenor

    You are absolutly right Ben, and I think there is a lack of definition about these two concepts: “Programming Language” and “Markup Language.” Even people who have been working in the field for years still have this misinterpretation about them. And I think the best way to distinguish them is to figure out the purpose of each of them (what a programming language does? and what a markup language does?) and at this point they will conclude that HTML is a Markup Language.
    Good Job!

  • ElectroSexual

    coding means HTML.
    programming means Gui4Cli or java or AutoIt or VB.NET.

  • elmanjo garcia

    malay ko sayo kw na matalino

  • 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.

  • Computer Scientist

    I am an experienced computer scientist who programs using the main languages and I am English. By saying that I am English I am referring to the fact that I can understand English verbs like “Program”. This is a simple verb that is used to denote: “The input of coded instructions to a computer that make it perform a particular task.”

    You will find various spins on this definition in all the major dictionaries but they all basically mean the same thing. It is very, VERY succinct and does not give any reference to Turing equivalence, type of syntax or the type of logic used etc.

    People who say that HTML is not a programming language do so because they do not know any better or because they do not understand plain English or computer science. Using a Mark up language (like HTML) is a type of programming… at least as far as science and the English dictionary is concerned. For example, I am an animal in the same way as a cat is an animal. The cat and I both fall under the same category of animal. Just because I fall under the category of Homo Sapiens does not mean that I no longer fall under the category of animal.

    UNOFFICIALLY speaking the computing community “avoids” referring to HTML as a programming language because it is more intuitive to refer to it as a mark up language.

    I dare say that NO amount of pressure from the computer community is going to change the meaning of simple words in the English dictionary. Until the day does come that those people have rewritten the English dictionary we can be fairly self assured that… HTML IS MOST CERTAINLY A PROGRAMMING LANGUAGE!!

    Oh… I almost forgot to mention… The article says: “HMTL simply contains no programming logic.”

    If you do not understand the simple premise that instructing a browser how to display data on the screen is “logic” then do you really think that is wise to write an article like this?

    [sic]”It doesn’t execute actions.” Really?

    • What is the definition of “logic”?

      markup |ˈmärˌkəp|
      [Computing] a set of tags assigned to elements of a text to indicate their relation to the rest of the text or dictate how they should be displayed.

      logic |ˈläjik|
      [Computing] the systematic use of symbolic and mathematical techniques to determine the forms of “valid deductive argument.”

      program |ˈprōˌgram, -grəm|(Brit. programme )
      [Computing] a series of coded software instructions to control the operation of a computer or other machine.

      According to the word definition found in our English dictionary, it sounds crystal-clear to me that HTML, hence its full-spelling, HyperText Markup Language, is NOTHING MORE THAN a markup language from the day it was first invented. So, we programed a ( graphically-enhanced web) browser such as Mosaic, i.e., software, to display it, i.e., non-programing-language, in a way we, the human, can actually better understand or in other words, drive the value from the data, which becomes the information.

      browser |ˈbrouzər|
      [Computing] a program with a graphical user interface for displaying HTML files, used to navigate the World Wide Web: a Web browser.

      The advance in hardware development that gradually enables the (coded) software, i.e. a programing language, to function in a logical way should dictate the definition of what a (programing) language is, starting with the early punch card, i.e., the mother of code.

      Following your argument, or playing along with your unscientific game of throne here, filling in a scantron with a black marker, which is a modern day version of the oldest programing language, i.e., printed code, is, by the definition, still a programing task in the realm of “computing”. If so, using a scantron would be just as meaningful as “organizing” a set of markup language such as HTML, thus becoming a programing language.

      computing |kəmˈpyo͞otiNG|
      [Computing] the use or operation of computers: developments in mathematics and computing

      The funny thing is though a scantron is indeed a programing language that actually involves logic, i.e., “the systematic use of symbolic and mathematical techniques to determine the forms of valid deductive argument.”, thus actually solving a problem, which means it turns data into information, whereas HTML can only display data, otherwise pre-calculated answer, solved by a programing language.

      • Cheesus Toast

        Nice speech but it still does not present any actual evidence to refute my original statements, does it? You do realize that there are quite a few dictionaries out there and they all have varying ways of describing the same thing.

        How you have come to the conclusion that it is “crystal clear” that HTML is not “coded instructions used to perform a particular action” is kind of odd.

        • There is a clear difference between a web page (web design) and web application (web development).

          For example, Facebook or Amazon is collectively known as just another website one can visit to, but it is, in reality, web-integrated software or we call, “web application” that is designed to function: such as calculating data in similar to how Excel works as well as flowing logistics, say, in the case of running e-commerce sites.

          Whether the site is built on using only HTML/CSS alone or with a help of using programing language to process data, it would look the same in the eyes of users, but when we are talking about programing to create a new web application, that is no different from creating a new software that runs on your desktop such as Operating System (e.g. Windows), or the gaming software you play.

          I think you are utterly illiterate what the programing means or does. I will tell you this though that using HTML/CSS is a part of building a complete web application, the front-end that gives you the look and feel of what the product/service is.

          Just because you have a Macbook Pro case, it doesn’t mean it is a Macbook Pro without all the necessary hardware and software. But then, it is not a Macbook Pro, i.e., not a complete product, without the unibody case that gives you the look and feel of the product.

          If you simply ask the computer what is “1+1=?”, the computer should be able to answer that question, had you used the proper language in a way the computer can understand to solve the problem, but that is not going to happen if you ask that very question in HTML because it is just the language for the web browser, not the computer.

          • Cheesus Toast

            The 4th paragraph first line contains a grammatical error. The amusing thing is that it was intended to be an insult; however it kind of backfires a little bit. “Illiterate” is normally used to denote someone who cannot read or write or it could mean someone who is unschooled or ignorant of a particular subject. I would image that that would not be the first impression that someone would have about me with reference to what I have said. The use of the word “illiterate” in this context is referred to as “hyperbole”.

            Anyway… enough with this extended conversation about things that do not really need to be discussed (you may possibly have noticed at this point that there is a satirical quality to my ramblings within this response).

            You have not actually said anything to refute what I have said yet. The mere act of insulting people does not make you correct and the opposing party incorrect. My original argument was that, technically speaking, HTML is a programming language. It is a programming language by dictionary definition and from a scientific viewpoint. People’s desire to add more parameters to existing definitions does not make their new definition a reality.

            Just a hint here… I am a web developer. I program using well known languages like C#, PHP, Ruby, Python etc. I have mentioned that just so that you can avoid preaching to the choir. To add to that I have a university level education as well (computer science). Of course you can disbelieve any of that as much as you wish but it is irrelevant. If you cannot adequately disprove my original argument with clarity and proof then maybe you should cease this discourse.

          • Matthew Whited

            That doesn’t stop HTML from being a specific domain language that tells a computer how to do a particular thing. in the case of HTML and CSS that thing is layout/render hypertext websites. HTML is most defiantly a declarative domain specific programming language. True it is not an imperative general purpose programming language but at the broad definition of a programming language it most certainly does provide instructions for a computer to do something.

    • Chad On Data

      The day you can use HTML to do math or build an algorithm, then you can call it a programming language. As an “experienced computer scientist,” you should be well aware that HTML is not even close to being Turing complete (which any computer scientist will tell you is the test for whether a syntax is a programming language).

      Great article, Ben!

      • Cheesus Toast

        Same old argument again and again…

        I know what Turing completeness is – something is said to be Turing complete when it is Turing complete. Why is this being mentioned in a discussion of whether computer scientists should start trying to rewrite the dictionary?

        Where does it say that putting 2 generic words like “programming” and “language” together changes the meaning of those 2 words? Is that part of Turing completeness? To add a load of new parameters to the definition of words already in use within the English language? No… in fact it is not part of anything is it?

    • miggy592

      well said

    • Pharap

      Don’t call yourself English unless you come from England; if you call yourself English because you can speak English then you clearly do not understand the language.

      • Cheesus Toast

        Has it occurred to you that the person you are replying to is actually from England and is English? Maybe not…

        There clearly seems to be something wrong with your understanding here. You write coded instructions into a text file and you give that to the browser to interpret. Those markup instructions tell the browser to configure the data that they are associated with in a certain way. What part of that is not instructional?

        The browser is part of the computerized system! You do realize that instructions are actually information don’t you? If a drill sergeant orders troops to march in a certain way then he is providing them with information on what to do.

        Not all information is instructional but all instructions are informational. The first sentence you wrote in the second paragraph is actually quite ridiculous to be honest. Also, of course html does not tell the browser HOW to do things! In the same way, someone may not tell the repair man HOW to fix their boiler; they just tell the repair man to fix it.

        HTML is code and it also has a syntax and vocabulary. That code is used to provide information on what should be done with the data that it pertains to. It is coded instructions… exactly matching the description of programming in the dictionary. It does not matter whether that code is in the form of holes punched into a piece of card; it is still program code. It is as simple as that.

      • André Breda

        You are contradicting yourself “The HTML indicates to the browser what to render, but it doesn’t tell the browser how to do it” -> HTML can tell what should be done, not how to do it. That is the definition of a declarative programming language.

        • Pharap

          Firstly, good lord that was an old comment.
          Secondly: no I’m not contradicting myself. A web browser could choose to render the HTML as sound if it wanted to (as many screen readers do). HTML is just markup. If the browser wants to default to pink text on a black background and the HTML has not stated otherwise using the style attribute (which is somewhat frowned upon), the browser is free to do so. “The HTML indicates to the browser what to render” Yes it does, it gives the browser the page structure and contents, that is what the browser must render. At no point does that contradict the following statement “but it doesn’t tell the browser how to do it.”

    • This question always pops in my mind since long years working with HTML and PHP. I always have battle with my mind for this and also gone through with many articles. Eventually, you gave the correct answer.

      I agree with you. It may be fall under different category but without being program how it could converts all HTML tags into the rendered page? How can tags identify css rules, class and id?

      So, I believe that the saying Mark Up language is just a category but as your example of an animal, it is a programming.

    • Lazaro Alejo

      I know no English, much less coding or programming or whatever you want to name it, but one thing I know, I’m not at the same category of animals, but if you want to call animal yourself, that’s your choice

      • André Breda

        So you’re not “a living organism which feeds on organic matter, typically having specialized sense organs and nervous system and able to respond rapidly to stimuli”? Or if you want the scientific definition: You don’t fit into the category “any of a kingdom (Animalia) of living things including many-celled organisms and often many of the single-celled ones (as protozoans) that typically differ from plants in having cells without cellulose walls, in lacking chlorophyll and the capacity for photosynthesis, in requiring more complex food materials (as proteins), in being organized to a greater degree of complexity, and in having the capacity for spontaneous movement and rapid motor responses to stimulation”? Alien perhaps? It’s a matter of biology, not opinion or differences. A space ship, no matter how different from the other vehicles is still a vehicle: it transports things. And you and me as multicellular organisms with eukaryotic cells (but no chloroplasts) are animals.

  • RSAdisqus

    Nice post, Ben. I’d disagree with Computer Scientist’s view that HTML is a programming language; I think it could similarly be argued that word processors provide a visual programming language and that the text documents they type and format constitute programs–or, alternatively, that visual programming environments *don’t* count as programming environments because they don’t involve “coded instructions”. I don’t think anyone would go so far in either direction.

    That said, I do think there’s a broad, fuzzy boundary between programming and non-programming uses of computers. For a technical example, there are some kinds of UML diagrams that look very much like programs to me, even if there exists no virtual machine to execute them.

    • bro_my

      Thanks for the feedback! I agree that the boundary can be fuzzy. I just wanted to make the distinction for coding and how it’s not necessarily the same as programming. Whether you’re writing HTML, JSON, Python, or Ruby, you’re without a doubt writing code. But there’s code that serves programatic, computational, and algorithmic purposes and then there’s code that serves presentational, formatting, and data structuring purposes and I think that’s the difference worth noting.

      • Cheesus Toast

        So in actual fact you are now saying that it is merely DIFFERENT to other types of coding. The definition of programming language remains the same in the dictionary and HTML still falls under the category of coded instructions given to a computer…

  • Aaron

    This is true. HTML and CSS are both markup languages. It does bother me when employers get them mixed up.
    Scripting- Ruby, Python, PHP, Latex
    Markup- HTML, CSS, XHTML
    Programming- Java, C, Basic

    • bro_my

      Definitely. It just looks weird seeing HTML listed under “Programming Languages”. Instead, it could be listed under “Markup” or just safely grouped under “Languages”.

    • Cheesus Toast

      Why does it bother you? Also, precisely what is meant by them “getting them mixed up”? Are you worried that they are going to ask you to develop an application using just CSS? You must have many sleepless nights.

      All of those things that you have mentioned are programming languages because they all satisfy the definition of “programming language”. Just because something is merely declarative does not mean that it does not provide coded instructions. Oh, and by the way, you can use Java, C and Basic as scripting languages.

  • ramblingsoncode

    It says HMTL in the “Not a Programming Language” paragraph.

    I don’t understand why people think HTML is a programming language. I mean, the M stands for “markup” and it is right behind the L for language, right? right?

    • bro_my

      Thanks for the proofread. Edited.
      And yeah, “Markup Language” is actually right in the name, so that’s a clue right there.

    • Cheesus Toast

      OK… to clarify for you why computer scientists refer to HTML as a programming language: it is a “language” that is used to give “coded instructions to a computer system”.

      Is it required for me to expand on that any further? Incidentally a dog is still an animal even though the word “dog” contains none of the letters found in the word “animal”. I am being patronizing now, right?

  • Jag

    And speaking of languages, “per say” isn’t a part of any of them. Try “per se”.

  • HTML is not a programming language but it is a markup language. The programming language is different with some programming logic and frameworks like .NET, PHP, JAVA etc. You can not say that HTML is a programming language.

    • Ufo_rob

      A programming language doesn’t necessarily need a framework for example C, C++ and Pascal are programming languages without a framework.
      Microsoft .NET is a framework but NOT a programming languages (programming languages for .NET framework are C#, Visual Basic, C++/CLI, F#, IronPython etc.)

    • Cheesus Toast

      Next you will be saying that, “…a dog is not an animal, it is a mammal!” Yes, you can say HTML is a programming language… because it is! It is not up for debate unless you are struggling with dictionary usage.

  • HTML is an acronym for HyperText Markup Language, not a programming language. It is generally used only for creating the layout of a web document.

    • Cheesus Toast

      It might be worth noting that your comment does not actually make any sense. “Java” is a name that was chosen because it sounded cool. Is it not a programming language because it is not called “Java programming language”?

      “Programming language” is a description and a basic category. It is not something that it is mandatory to have in a name in order for the item in question to be called a programming language.

  • Such a nice fact you have share here. 85% designer don’t know that HTML as well as CSS both are not a programming language. But they are Mark up language.

    • Cheesus Toast

      Thank you for providing us with a nonexistent statistic there.

  • Ufo_rob

    I wonder PHP, Haskell, Perl, C#, Delphi, LISP, Scheme, Fortran, MATLAB, JavsScript, Ruby, VBScript, Visual Basic, batch, SQL, ActionScript and, above all, Pascal versions of comic stripe

  • Pingback: HTML5 Everywhere: Michael Booth speaks at Infocamp Seattle 2013 | Katablog()

  • Mel

    Great article, you broke it down, very user friendly.

  • HerrSerker

    Coding is a system of telling a machine in a formalized way what you want from it.
    Programming is a sub group of coding. It makes use of formalized way to create strauctured processing instructions.

    • Cheesus Toast

      I respect what you are saying but I must point out that coding is simply another way of saying programming. There is no sub group involved here. Far be it for me to say that the word “coding” is slang but the nature of the word implies what it is. It is simply a descriptive word that implies an action.

      When generic English words are used in this way you cannot arbitrarily redefine the parameters of the word. If you wish to create a new word to describe an action then, by all means, go ahead. You do, however, have to define a new word and not redefine an existing English word like “code”.

  • Sarah Bratt

    You recommend putting on a resume under “languages” or “skills,” but the iSchool resume templates have it under Programming Languages. Would you say this is not right?

    • bro_my

      Aha. I see what you mean. In my honest opinion, HTML shouldn’t really be under that heading. That would be like putting SQL, or even XML, under “Programming Languages”, which wouldn’t make total sense either. Putting HTML under a safer, more encompassing heading like “Languages” is a better idea.

      • Sarah Bratt

        Thanks! Have you asked any IT employers/recruiters what they would prefer to see?

        • bro_my

          Coincidentally, I have a friend who’s a tech recruiter whom I’ve asked. He said that while some hiring managers are more picky than others, an actual hiring decision is probably not going to come down to what specific heading a resume has HTML under. So in that sense, there is no preference.

  • Ken
  • Cathtseosto Javasling Neluheni

    Does HTML need a compiler?

    • Cheesus Toast

      No, it is merely interpreted by a browser or whatever application you so wish to use. I do not really see any reason at present why it would need to be converted to object code. At some point it is going to get converted into 1s and 0s but it is not through compilation. It is more or less the same thing as XML although (if my memory serves me correctly) HTML was actually created first (do not quote me on that though).

      • Cheesus Toast

        I must just add that I have not necessarily suggested that XML is a programming language. It is actually more of a construct to which instructional code can be developed. It depends on its implementation. HTML is not the same in this respect because it has a specific vocabulary. Because it has a syntax and vocabulary (that are used to give instructions to a computer system) it can be described as a programming language semantically within the context of the dictionary and computer science.

    • Matthew Whited

      Neither does PHP, BASIC, PERL, JavaScript, Python, Ruby, Logo, Lisp or another other language that uses an interpreter. HTML is a domain specific programming language.

  • obfpen

    Ben, you make a lot of claims for what HTML can’t do that aren’t quite true.

    It does have a conditional, one which is also an event handler. What else is <a href=””>Click Here</a> if not an abstraction for IF user activates this region THEN load given location?

    You also claim that: you can’t write functions; HTML can’t take input and produce output; it can’t do maths and compute 2 + 2. I offer Exhibit A:
    obfpen (dot) github (dot) io (slash) html-adder
    This takes two binary numbers from the user and presents their sum by implementing a full adder with recursion. It is written entirely in HTML. You can download it and run it locally to confirm that.

    So, takes input from users? Check. Produces meaningful output? Check. Created with HTML only? Check.

    Tell me again why HTML isn’t a programming language.

    • aidanjt

      A href is only a reference to another document, the format doesn’t actually perform logical evaluations, the browser is only dumbly following a reference at the user’s command. Nor is loading cleverly presented static pages a calculation, any more than printing out an addition table is calculating. It supports neither statements nor expressions, it isn’t turning complete, period.

      • obfpen

        Well then, we’d better also rule out all pocket calculators and computer processors ever to have used a half- or full adder to “calculate” something. After all, they’re not really doing the work, are they? They’re just mechanically producing the correct result for any valid input, and ‘cleverly presenting’ it on a human-readable display. And what good is that?

        We also need to rule out any interpreted languages, because “the format doesn’t actually perform logical evaluations”; the interpreter “is only dumbly following” along. Compiled languages are out for much the same reason: compilers are doing the work. Or are they? Let’s not forget about the machine-level instructions.

        But even there, we are forced to conclude that there are problems. A JUMP instruction, when we really examine it, “is only a reference to another” part of memory, so we have to throw out function calls and if-else branching along with that bathwater.

        I never claimed HTML was Turing (or even “turning”) complete (though there’s an argument for HTML+CSS), but programming languages don’t actually have to be. As the OED will tell you, programming is “[causing] (a computer or other device) automatically to do a chosen task or perform in a chosen way”. The instructions can be as boringly explicit as anyone would care them to be (see just about every “Hello, World” program ever, with their utter lack of ‘real’ computation), and they still constitute a program.

        If you’ve only ever been exposed to the imperative paradigm, you might be forgiven for your shortsightedness. HTML is part of the declarative world, where the point is to say ‘what’ you want, and not worry about ‘how’ to achieve that. Like functional programming, it’s a higher-level abstraction that far too few have been made aware of.

        Arguing that something created for the purpose of telling a computer how to behave isn’t a programming language because it lacks Turing completeness is as silly as claiming that most people, overencumbered as they are with two whole arms, aren’t actually humans because, as statistics will clearly show, humans have slightly less than two arms.

    • AllKnowingOrb

      Sorry you have it all wrong. Its markup. Just structuring data there is no logic.

  • Pingback: ICS 120 – [August 18/ Laboratory Activity 4] | Angel's Sphere()

  • Pingback: HTML isn't a programming language! - Tetracious Frustration()

  • Pingback: How to code, part 1 – Getting Started |

  • I somewhat agree to the post that it is not a programming language though it could be used with programming languages.

  • Pingback: TwoRoxBlog » 8 best free online resources for the beginner web designer()

  • Juan David Maya

    My logic is: “if HTML is a programming language then Microsoft Word is too”

  • Really educating and besides diverting information, thanks for sharing informative blog.There as definitely a lot to learn about this topic.

  • Pingback: Code First: Girls Summer Intensive | Z W S M()

  • dank

    “programming” and “coding” is all just semantics