Enroll Course

100% Online Study
Web & Video Lectures
Earn Diploma Certificate
Access to Job Openings
Access to CV Builder



Online Certification Courses

The Myth About HTML Being A Programming Language

Html programming. 

Is HTML a Programming language?

For a long while now, there has been an argument of whether Html is a programming language or not, so this article is to clear some myths about it.

Technically, HTML is a Computer programming language. In fact, HTML stands for Hypertext Markup Language. Whether HTML is a 'real language' or not is a matter of semantics, and not a terribly important factor.

What is very important, though, is for you to understand that HTML - and CSS, for that matter - is very different from other computer programming languages, and it is also difficult to get a big picture of what coding looks like from just those two languages alone.

How are HTML and CSS different from other programming languages?

HTML and CSS are referred to as declarative languages. Because they are basic code statements that declare what should exist on a web page. Here is some sample HTML code :

<section>
  <h1>This is the headline within this section.</h1>
  <p>This is a paragraph within this section.</p>
</section>

From the code above, we can see that the HTML says that this webpage should have a section, and the section should also have a heading one and a paragraph. There isn't any kind of computation going on- it is a simple statement of fact. This is what I meant when I said that HTML as a declarative language.

Also, here's some sample CSS:

  p {
    color: red;
    font-size: 12px;
    text-align: center;
  }

The CSS above says that all the paragraphs that are on the webpage should have text that is in red, a size of 12 pixels, and they should all be aligned in the center. Again, there is no computation going on - it's just a series of simple declarations.

While HTML and CSS are declarative in design, most coding is computational - and it is what most other programming languages are developed for.

Here's some computational code that is used to the average of a list of numbers:

list = [5, 2, 10, 8, 9, 4, 7]
sum = list.sum
average = sum / list.size

In the code above, we can see that instead of making declarations, it id carrying out a series of computations in order to obtain an end result. The first line here would initialize the list of numbers. The second line here calculates the sum of all the numbers that are on the list. The third line here computes the average by dividing the sum by the number of items in the list.

The vast majority of other coding languages like python, javascript, PHP, involves writing computational code. Computational code is not always mathematical in nature, but it is the code that creates the functionality. While HTML and CSS are declarations about what should be visible on a web page, computational code is what "makes the stuff happen". Adding a shoe to your shopping cart, killing a bad guy in a game, deleting an item from your todo-list - these are all examples of application functionality and are only accomplished through computational code.

The reason why this distinction is very important is that many people start their coding journey with HTML and CSS. And while that is a fine place to start, it is important not to jump into a new career that is based on your experience with those languages alone. It is premature to just assume that you enjoy coding and, say, sign up for a coding Bootcamp if you have only had experience with HTML and CSS. To truly know whether you'd enjoy coding, you would want to have some experience with a full, computational programming language, as most programming jobs are just about writing computational code.

Conclusion

In conclusion, HTML is a markup, declarative language, that is used to define how something would be displayed on the web, so it is a programming language.

Corporate Training for Business Growth and Schools