Is HTML a Programming Language?

When we talk about a programming language, we can say them as a medium to communicate with the computer. To express ourselves, we as humans talk with each other using any of our native languages but we cannot simply communicate with the computer the same way.

It simply can’t understand our native language. Instead, we need a translator who can translate our language into a computer’s language.

Now, before talking about the translator, I want to talk about the topic of today’s post, i.e. is HTML a programming language?

HTML is a declarative programming language. What does that mean? Well, a declarative programming language is a paradigm that only states what the result should look like and not hot to achieve it. We use basic statements for achieving something we want. Here we use constraints to describe a user interface.

User Interface

This is how we use constraints for creating a UI using HTML.

These constraints are going to describe the structure of our UI. Here the h1 is going to be a heading of our UI and the p is going to be the paragraph of our UI. The HTML parser or the HTML engine of the browser is going to render the UI from the above constraints. Here, we haven’t described how to achieve our desired UI.

Whereas in other programming languages, we have to teach a computer how to achieve a particular result. For example, if we want to make a simple calculator, we need to show the computer how to do that.

All these programming logic can’t be implemented using HTML and can only be achieved when we use Javascript, a type of programming language for the web.

So, how to implement the same logic using HTML and JS? Let’s see.

This states that we can’t implement programming logic in HTML but we can achieve that using Javascript.

Now, I hope you get what I’m trying to say for HTML.

Well, this was all about today’s topic and points related to it. If you stuck into any kind of confusion, don’t forget to google it and try to solve it on your own. This will teach you how to learn on your own as someone might have faced a similar problem earlier.

Still, if you still don’t find any solution for your problem, you can ask your doubt in the comment’s section below and we’ll get back to you🤓. Till then enjoy your code. See you in my next post. Bye✌️!

Leave a Comment

Your email address will not be published. Required fields are marked *