Is HTML considered a programming language?

Question

Is HTML considered a programming language?

Answer

Some people might argue that HTML is a programming language, but the majority of programmers will say NO, it is not a programming language.

This is because, by its definition, a programming language provides functionality. It does so with a set of syntax and grammatical rules which give instructions to a computer to perform specific tasks like logical tasks, algorithms, loops, and so on.

HTML does not provide these things, which means it is not a programming language. Instead, HTML is specifically a markup language, which does not deal with logic, but with presentation.

117 Likes

One could argue that “presentation” is not the correct term since by definition, unobtrusive markup contains no presentational elements, only marked up data, which is what HTML is at the core… Raw text data. Presentation and behavior are handed over to the Cascading Style Sheet and DOM script, respectively. This is referred to as, separation of concerns.

Interesting reading…

A Brief History of Markup by Jeremy Keith

Standard Generalized Markup Language

31 Likes

Hyper Text = Text linked together using HTTP (Hyper Text Transfer Protocol)
Markup Language = A language that uses tags to mark or highlight elements in a document.

So by that logic, HTML is a language for linking or tying text documents together to create a branch or web. To me, that certainly indicates HTML is NOT a ‘PROGRAMMING’ language. Once you are comfortable you should move into Python from HTML. That will give you exposure to Web development with markup languages and actual data management/automation with a real programming language. Just my opinion, i’m learning too.

10 Likes

While opinions diverge on this and other topics in programming, I believe the main take-away is to realize the type of assumptions/interpretations under which people will say some specific language could be considered a programming language or not.
This linked video answer, while giving a context under which one could look at HTML as a programming language, gives an overall view on some of the yays and nays of such considerations.

17 Likes

What would be the correct term, rather than presentation? Also is HTML considered a type of code despite being widely regarded as a MarkUp language, rather than a programming language?

1 Like

Structure, comes to mind. Until desktop publishing really evolved, Markup Language was meant to give structure to ordinary text for the purpose of transmission over a network between multiple platforms. The markup was a way that each platform could produce the same output.

A programming language, it is not. There is no logic or real time decision making. It’s a static document that is parsed one time from top down by the rendering engine built into the browser.

13 Likes

What other Markup languages exist?

2 Likes

The one we use (HTML) has evolved for the web from SGML and XML. Others are more specialized, such as MathML, &c.

List of document markup languages - Wikipedia

1 Like

I would not consider HTML as a programming language. It is just a way to present a web page. There is no logic in plain HTML.