Table of Contents
When people ask me which skills they should start with when learning web development, I always tell them to learn HTML and CSS first. They may not be generally considered programming languages, but they’re some of the most important skills you can have as a web developer.
Here’s why you should learn HTML and CSS before JS:
While some may argue otherwise, the reality is that even if you were to use JS alone, you’d still need at least one HTML tag when creating a site. Besides, most JS frameworks (like React and Angular) use HTML tags to create their user interfaces.
In the past, web pages were designed for desktop screens with a static resolution. But today, users access the internet on various devices with different screen sizes — from smartphones to tablets to desktop computers. That means web pages must be responsive or adapt to the screen resolution of the device they’re being accessed on. And the only way to create responsive designs is with HTML and CSS.
If you don’t know HTML, you won’t be able to understand how the DOM works, and you’ll have a hard time trying to manipulate it.
When building a website, you have to make sure the content looks good and that it works properly. For example, if you’re creating a form, you must ensure that the form elements are correctly aligned and that the submit button functions as intended.
If you don’t know HTML and CSS, there’s a good chance your website will have some underlying issues, even if the content looks good. For example, a form that’s not aligned correctly can cause the submit button not to work correctly.
Notably, understanding how the different technologies work together gives you a better overall web development experience.
As I mentioned before, HTML is the foundation of every web page. It’s a markup language used to create the structure of a web page. That means it’s responsible for defining the different elements on a page and how they’re arranged. HTML consists of a series of elements, each of which represents a different part of the page.
For example, there are elements for headings, paragraphs, and lists. By nesting these elements inside each other, you can create complex pages with a clear hierarchy.
Once the HTML structure has been created, CSS steps in. CSS stands for Cascading Style Sheets, and it’s a language that lets you control the look and feel of your page. For example, it comes in handy when you need to change your page’s color, font, and layout.
In addition, CSS lets you create responsive designs that adapt to different screen sizes. That means your page will look good on both desktop and mobile devices.
Here’s an excellent YouTube video introduction to HTML and CSS:
In a nutshell:
- Static website = HTML + CSS
- Dynamic website = HTML + CSS + JS
There’s no “right” answer when choosing which language to learn first. If you have the right mindset and are ready to commit a few hours each week to learning, you’ll be able to learn any of these languages relatively quickly.
That being said, there are a few things you should keep in mind when deciding which language to learn first. Here are a few tips:
What do you want to learn? Do you want to build websites or web applications? If you’re not sure, take some time to explore different technologies and see what interests you. Doing so will help you narrow down your options and choose the right language for you.
For example, if you try to learn CSS before HTML, you may not understand how the different elements work together.
If you need a handy resource for learning HTML and CSS, get this HTML and CSS: Design and Build Websites by Jon Ducket (from Amazon.com). The book explains the basics of HTML and CSS in an easy-to-understand way, making it a great resource for beginners.
If you’re not sure which language to learn first, look at Codecademy’s Web Development Path. This path offers a guided tour of the different technologies involved in web development, starting with HTML and CSS. You can also find other resources (like tutorials and articles) to help you choose the right language.
Did this article help?