Should you learn HTML before Python? How to make the tricky decision!

The popularity of Python has skyrocketed in recent years. It has a tonne of different applications and is easy to use. 

Python has now become the third most popular developer technology behind HTML/CSS and JavaScript. The ease with which it handles big data has made it popular in the data sciences and meant the wider developer community is adopting it in droves. 

But should you learn HTML before Python? Overall, you should learn HTML before Python if you intend to make apps for the web because it is the fundamental building block for websites. However, for desktop or command line projects you won’t use HTML so you can learn Python first.

So, the area of development you want to go into will determine whether you should learn Python or HTML first.

However, it’s not always clear in which order you should learn languages. New developers often get stuck deciding if React is worth it or whether they should dive into JavaScript before HTML.

Let’s take a deeper look into the situations where learning HTML before Python will come in handy.

HTML vs Python

Before we dive into the specific instances of when you should learn HTML before Python, or vice-versa, it’s important to properly understand what they are.

It can be a little overwhelming when people start talking about server-side, client-side, fronted, and backend. 

Let’s define HTML and Python so we can look at the best ways to use them. 


Python is used for automating tasks, analyzing data, creating websites and software, and visualizing data. It is an object-orientated, high-level programming language that has built-in data structures. 

Its simple syntax and readability make it ideal as a server-side (backend) language for projects of all sizes. Python has also become the de facto language for machine learning. 

For web pages, Python generates the data it wants to display on the backend and then uses front-end technology to display it. It can also be used on the desktop, command line, and the web.

Various non-programmers have utilized Python to accomplish and automate everyday tasks like organizing finances. 

Python also has a lot of extension libraries so it supports modules and packages which promote code reuse and a modular programming approach. To learn Python you’ll need to pick up some core programming concepts. 


HyperText Markup Language (HTML) is not a programming language. It is a markup language used by web browsers such as Chrome to format pages. 

HTML describes the structure of a page in a way that the browser can interpret it. Different elements are used to position and structure content on the page, these include inputs, buttons, and divs. 

Often HTML is learned alongside CSS or a CSS framework like Bootstrap so that developers can style their pages.

You can only use HTML on the client side or frontend. It won’t work outside of a web browser and can be used to create desktop apps. Although the introduction of Electron JS had changed this slightly.

Unlike Python, you won’t have to learn any programming concepts to be able to use HTML. It doesn’t require any logic or specific setup. 

You can get going straight away and the immediate feedback you receive when adding elements is a great motivator for those learning HTML and development in general.

Should you learn Python or HTML first?

Deciding on whether to learn Python or HTML first can leave a lot of would-be developers with analysis paralysis. 

There isn’t a perfect first language to learn. It all depends on what area of development you want to go into. Quickly learning Javascript is perfect if you want to develop web apps, but not ideal if you want to create databases.

Let’s take a look at a few ways you can create apps and whether it’s better to learn HTML before Python. 

Desktop Development

A desktop developer builds software that runs on Mac and Windows. If you are keen on this pathway you probably won’t need to learn HTML. 

Desktop applications are usually built with C#, Java, or Python. A library called PySimpleGUI gives you all the tools you need to build a fully-fledged desktop app. PyQt5 is also great for GUI building. If you intend to go this route then definitely learn Python first.

However, there is a caveat. 

Up until recently HTML, JavaScript, and CSS couldn’t be used to create desktop apps. The introduction of the Electron framework means you can use web technologies along with Chromium and Node to build stuff for the operating system. 

So deciding what to learn first isn’t as clear-cut now. Most desktop software doesn’t use web technologies s if you plan on going this route stick with learning Python, Java, or C# first.

Some awesome first projects include:

  • Audio and Video Player
  • Calculator 
  • Image manipulation software

Web Development

A web developer builds software that runs in a browser, this includes but isn’t limited to web apps and websites. 

As we discussed earlier, HTML is the fundamental building block of web pages. It gives them structure and allows the browser to interpret the page. 

If you plan of building stuff for the web, then you must learn HTML before Python. Without it learning, CSS and Javascript would be impossible. You wouldn’t have any context for the way a web page works. 

The cool thing about Python is that you can use it on the server side to render web pages. So if you want to become a web developer but are keen on Python, then feel free to learn both. 

But just focus on the basics of HTML before graduating from Python if you want to develop products for the web.

Some cool first projects to mix HTML and Python include:

  • Tic Tac Toe
  • Quiz application
  • Content Collator

There is a nifty Python library called pygame that is perfect for developing different games online.

Python: General Usage and the Command Line

Many people are picking up Python to help automate their day jobs. It’s easily integrated into Excel and other programs and saves a lot of time. 

You can also build stuff with Python in the command line to help you solve specific problems. The command line has no GUI and does not run in the web browser so it is very different from the sections above. It is the original method of interacting with programs on your computers

People with Python skills can use the command line to automate repetitive daily tasks.

If you want to automate general work tasks or specifically use the command line, then don’t bother learning HTML, learn Python first.

There is no need for HTML in the command line or Excel spreadsheets, so picking that up would be a waste of time.

To explore using Python in a more general sense, I’d recommend building:

  • File Renaming Tool
  • URL Shortener
  • Excel Spreadsheet splitter

Do you need to learn HTML and CSS before Python?

You do not need to learn HTML and CSS before learning Python. HTML and CSS are used for front-end web development, while Python is a general-purpose programming language that is generally used on the backend. It can be used for a wide range of applications, including web development but is used a lot on the server side or for data manipulation.

If you want to become a web developer, learning HTML and CSS is crucial, as they are essential for creating and styling web pages. However, if you are interested in learning Python for other applications, such as data analysis or machine learning, then HTML and CSS may not be as relevant.

That being said, having a basic understanding of HTML and CSS can be helpful when learning web frameworks like Django or Flask in Python, as these frameworks often involve working with HTML templates and CSS stylesheets. But it’s not a prerequisite to learning HTML and CSS before learning Python. It is also important to not learn too much at once.

Is HTML easier than Python?

HTML and Python are two different things and it’s not really fair to compare them in terms of difficulty.

HTML (Hypertext Markup Language) is a markup language used to create and structure the content of web pages. It’s primarily used for defining the structure and layout of web pages, such as adding headings, paragraphs, images, and links. HTML is relatively easy to learn and understand, as it uses a simple syntax and doesn’t require programming skills.

Python, on the other hand, is a high-level programming language used for a wide variety of purposes, including web development, data analysis, machine learning, scientific computing, and more. Python has a much steeper learning curve than HTML, as it involves programming concepts such as variables, functions, control structures, and object-oriented programming. However, many people find Python to be a relatively easy language to learn, especially compared to other programming languages like C# or C++.

The big benefit learning HTML has over Python is the feedback loop. You can open HTML markup in a browser and view the change you make immediately which means it is beginner friendly. Python on the other hand requires you to have an IDE and a better understanding of how to run code locally.

Ultimately, the ease of learning HTML or Python will depend on your prior experience with programming and your specific learning style.

Some people may find HTML easier because it has a simpler syntax and doesn’t require programming concepts, while others may prefer Python because of its flexibility and versatility.


Whether you should learn HTML before Python will depend on your long terms goals. For web development learning HTML first is crucial. However, if you intend to take the desktop development route then learn Python first.

For more general-purpose tasks, like automating the boring stuff (fantastic book by the way), stick with Python. 

Either way, don’t get stuck on deciding. Dive right in and get to grips with coding, you won’t regret it!