So, is HTML a Programming Language?

Author profile photo for CareerFoundry author Nicole Abramowski.

HTML defines the structure of web pages online. Depending on your age, you might know HTML as “that stuff you used to style your Myspace profile” (been there).

But what is it really? Is HTML a programming language? It’s a bit of a hot topic, actually, depending who you talk to.

In this article we’ll dive into what HTML is and how it’s used. We’ll also present both sides of the “is HTML a programming language?” argument, so you can decide for yourself!

You can click on a heading below to jump directly to that section:

  1. What is HTML?
  2. So, is HTML a programming language?
  3. Why HTML might not be considered a programming language
  4. What about a coding language? Are HTML and CSS considered coding?
  5. Should new coders learn HTML?
  6. How to learn HTML and CSS
  7. Final thoughts

1. What is HTML?

HTML stands for HyperText Markup Language.

Okay, but what is the text and why is it hyper? Hypertext is actually a piece of text that is used to reference another piece of text. Specifically, it’s text that contains links (hyperlinks) to other text. It can include graphics, video and sound. Markup language tells the browser what the structure and style of the webpage is.

If a website was a house, HTML would be the beams defining its shape. It’s made up of a series of elements that tell the browser how to display content. When you wrap HTML around something, you’re saying “This is a heading”, “this is a link”, “here is a new paragraph”, etc.

If you want to learn more about how it works, then take a look at our beginner’s guide to HTML.

An HTML element includes a start tag, some content, and an end tag. Here is an example of a very simple blog article online:

   <h1>My main blog article title</h1>
   <h2>Here is a subheading</h2>
   <p>This is a paragraph underneath my subheading</p>
   <h2>Another subheading</h2>
   <p>Here is more stuff I have to say, but <b>say it in bold.</b></p>

In this example we have the body tag, which contains all the content of our HTML document. We have the <h1> tag, of which there should only ever be one per page, that tells us this is the main title.

The <p> tags tell us it’s a new paragraph, and the <h2> tags tell us the text is a subheading (there are also h3, h4, etc, tags for subheadings within subheadings).

There are many different types of HTML elements than this, but this gives you an idea how HTML is used.

If you want to kick off your learning journey, this video from our in-house web developer Abhi will get you building your first webpage:

2. So, is HTML a programming language?

This ultimately depends on your definition of a programming language. Let’s consider that for a minute.

What is a programming language?

A programming language, at its core, is a set of syntactical rules. These rules instruct a computer to perform specific tasks. Each programming language has its own set of keywords it understands. These help it organize instructions. Just the same way as with human language, we use programming languages to communicate with computers.

Programming languages come in two main types: low-level and high-level.

Low-level programming languages

Low-level programming languages are your 0s and 1s. A processor can run these languages directly without a compiler or interpreter. These languages are very fast for this reason, but can be hard for humans to understand.

High-level programming languages

That’s why high-level programming languages exist. These languages are more user-friendly and readable for humans. They need a compiler or interpreter to translate the language into machine language.

Examples of high-level programming languages are Python, Java, JavaScript, PHP and Swift.

What is Turing complete?

Turing completeness is a concept from theoretical computer science. People use it to define what is and is not a programming language. It tells you how powerful a programming language is.

The name Turing comes from Alan Turing, who invented the Turing machine back in the 1930s. His machine could take a program and run it, then show a result. At first he had to create different machines for different programs. This was obviously not ideal, so he created a “Universal Turing Machine”, which can take any program and run it.

You can think of programming languages like these machines. They take instructions (programs) and run them. A programming language is considered “Turing complete”, if it can run any program that a Turing machine could run, given enough time and memory.

3. Why HTML might not be considered a programming language

Programming languages are Turing complete when they are able to run programs. Things like addition, multiplication, if-else conditions, return statements, storing/retrieving/deleting data, etc.

Can HTML do this? Well, not exactly. HTML by itself doesn’t really “do” anything, or contain any logic. It can’t do math, evaluate expressions, declare variables, create functions or manipulate data. You couldn’t do addition or subtraction with HTML. There is no way for HTML to take input and produce output.

We use HTML for structural purposes. Things like telling the browser which content is a header, a list, an image, and so on, but it’s not really functional.

To make a very long story short, HTML is not a programming language. At least according to Turing completeness. Now, the key term here is “programming”.

4. What about a coding language? Are HTML and CSS considered coding?

HTML is often combined with CSS, i.e. Cascading Style Sheets. As we learned in our beginner’s guide to CSS, it describes how HTML elements should be displayed on the screen.

So, we just said HTML is not a programming language (though some argue HTML combined with CSS3 specifically is Turing complete). 

But what about a coding language? When we write HTML combined with CSS, are we coding?

When you write HTML and CSS, you’re still writing lines of code, albeit in a markup language, not a programming language. At its core, you’re still codifying information to be used in the browser. HTML is a major part of front-end development.

So yes, you can consider HTML and CSS coding. Some also argue that HTML is a declarative programming language. A declarative programming language lets you express what you want done, but not how you want it done.

5. Should new coders learn HTML?

Every browser uses HTML, as it defines the structure of the web. Thus, understanding the basics of HTML is important for new coders. If you end up doing any type of web development, you should definitely learn HTML. Knowledge of HTML syntax will help you with other programming frameworks, too.

The JavaScript library React uses JSX, which stands for JavaScript XML. Put simply, JSX allows us to write HTML in JavaScript. Similarly, Vue uses an HTML-based template syntax. As you can see, understanding HTML syntax will help you understand these concepts in other frameworks.

5. How to learn HTML and CSS

The great news is that for those starting off on their web development journey, these two technologies are some of the best ways in. Due to their aesthetic nature (HTML building a site and CSS styling it) you can start to view the results of your labor almost immediately.

There are many online courses that will help you learn HTML and CSS. In fact, pretty much every coding course worth its salt will start you off with them, before adding functionality with languages such as JavaScript.

For now, here are a few suggestions:

Final thoughts

The debate about whether HTML is a programming language rages on. To make a decision, you need to dive into theoretical computer science topics like Turing completeness. Some say HTML is a markup language, but not a programming language. Others, though, say that HTML is a declarative programming language.

Whatever you believe, HTML is a core part of web development, and certainly worth learning! That’s why it’s one of the first skills you’ll master in our fully mentored Full-Stack Web Development Program, which will take you from coding novice to professional developer in a little as five months full-time.

If you’d like to read more about the world of coding, check out these articles:

What You Should Do Now

  1. Get a hands-on introduction to web development and build your first website from scratch with our free, self-paced web development short course.

  2. Take part in one of our FREE live online web development events with industry experts, and check out recent graduate Tanimara’s successful career-change story.

  3. Become a qualified web developer in just 5-10 months—complete with a job guarantee.

  4. This month, we’re offering a partial scholarship worth up to $1,365 off on all of our career-change programs to the first 100 students who apply 🎉 Book your application call and secure your spot now!

What is CareerFoundry?

CareerFoundry is an online school for people looking to switch to a rewarding career in tech. Select a program, get paired with an expert mentor and tutor, and become a job-ready designer, developer, or analyst from scratch, or your money back.

Learn more about our programs