Is HTML a Programming Language

Is HTML a Programming Language

Is HTML a Programming Language. Some people think that HTML is not a Programming Language but some insist that HTML is a Declarative Programming Language. Let's discuss this in detail.

Great Debate

Is HTML a Programming Language? This is the question that can divide or should i say that it does divide Programmers, Web Developer into two groups. Some people think that HTML is not a Programming Language but some insist that HTML is a Programming Language, maybe not a conventional, typical or orthodox kind of programming language but they say that no correct and complete definition of Programming Languages can exclude HTML from the list of Programming Languages. Hmm interesting...

Both parties have strong arguments to support their beliefs and we will discuss them in detail later but first let's talk about HTML and let me give you brief introduction of HTML.

What does HTML mean

HTML is a markup language and the abbreviation HTML stands for Hyper Text Markup Language. Markup Language is a language which is used to present the text of the document in a certain way and for that we use Tags. Markup tells the purpose of data or content and how to display it. HTML while being a markup language uses Hyper Links to navigate from one page to another. Hence the term Hyper Text Markup Language.

HTML is an example of Descriptive Markup language. In Descriptive Markup language markup is responsible of labeling the sections of documents instead of providing specific instruction about how they should be processed. Descriptive Markup langues are about What and not How.

Coming back to our great debate, Why some people consider HTML as a programming language and Why some people say it's not a programming language. I will share both types of arguments then you can decide on your own.

HTML is not a Programming Language

Some people truly believe that HTML isn't a programming language and to know the reason we need to know what really is a Programming Language.

Programming language

Programming language is set of instructions that perform logical and conditional tasks, It has a specific function which is performed by executing some logical statements or expressions based on conditions. Programming Languages have conditional statements like IFELSE, They have loops like While Loop and For Loop and they can perform arithmetic operations like addition, subtraction, division, multiplication and many more. Programming Languages evaluate expressions.

Programming Languages have set of instructions which produce a certain output. They usually have strict syntax. Programming Language are used to implement an algorithm. You can store your data using programming languages in memory of your device by declaring a variable. Web based programming languages can bring data from servers and some can perform on-page tasks like event handling and make your page interactive. Programming languages have a chunk of code that we can use again and again when needed to perform a certain task, this chunk of code is called function.

While HTML on the other hand doesn't really do anything like this. HTML is a markup language that only presents the data in a certain way. HTML contains no logical statements. HTML doesn't have any typical or orthodox conditional statements. HTML cannot evaluate any kind of expression. You can't perform arithmetic operations using HTML. HTML cannot bring the data from database like SQL, it cannot communicate with server like PHP, it cannot make your page interactive like Javascript.

You can’t store any kind of data using HTML. You can't declare variables using HTML. HTML doesn't have any Function that we can use again and again like typical programming languages. It can't change your content or modify it based on a particular condition. HTML have input elements but it can’t take input and give output after performing certain operation on it.

Based on all the arguments written above, one can say that HTML is not a programming language but first let's discuss the arguments that are in favor of HTML being a programming language.

HTML is a Programming Language

Some people believe HTML to be a Declarative Programming Language which also sounds very sensible but let's see first what Declarative Programming Language really is.

Declarative Programming Language

Declarative Programming Language is language that itself describes or declare What you want to do with it and it is not concerned about the How part. In Declarative programming language the programmer defines What needs to be done by the program and never specifies How it should be done, that's the concern of compiler. It is different from an Imperative Programming Language which specifies the steps to perform a certain task.

Similarly people believe that HTML is Declarative Programming Language because it tells the browser what it should do but it can't tell the browser how it should do it. HTML is based on SGML (Standard Generalized Markup Language) which is a declarative standard for defining document structure.

Adding HTML tags on an empty page and thus changing the behavior of the page can also be considered as programming.

Turing Complete

Also some people say that HTML is not Turing complete, so it can't be a programming language. But HTML is still a kind of coding and it tells your browser what to do, although HTML is not capable of doing many things that a programming language can do but then all programming languages have their limitations. Using HTML we instruct our Browser to display certain information or content in a certain way.


So based on all these arguments, you can either consider HTML as a programming language or don't consider it as a programming language. Both statements are correct to some extent. But still more than 90% of world's Websites use HTML which shows how important this language really is. Big names like Facebook, Youtube and Google also use HTML and it's one of the coolest, useful yet simple language you will ever come across.