I will never forget
The first time I saw HTML. It was back in late 2016/ early 2017, and I was doing most of my learning in coding sandboxes and the occasional YouTube tutorial. I was immediately intimated by the unfamiliar syntax. My face probably looked something like this.
What is HTML?
HyperText Markup Language (HTML) is a markup language that is used to describe content to the web browser (the “app” you are using to read this sentence). HTML was originally proposed in 1980 by Physicist Tim Berners-Lee as a simple but effective means of sharing research documents.
It wasn’t until late 1991 that the first public html elements were visible to the masses. 1993 is the official release date of HTML, so the language is 28 years old! HTML was evolved from a very simple markup language, to being able to do complex things like validating user form input and implementing dropdown functionality that previously required knowledge of JavaScript and CSS respectively.
Many people who learn web development
Say that HTML is easy! After all, it isn’t a programming language like JavaScript or PHP. Well, I have been learning HTML successfully for over a year now! I can safely tell you that HTML is NOT easy, but it is approachable with the right attitude (like most things in life, right?)
The reason that people say HTML is easy is because they write code like this
Pejoratively called Divitis, this type of code is unreadable and highly frowned upon. Not only because it is a nightmare for developers to work with, but also negatively impacts accessibility and SEO. I was learning HTML (and later CSS) from outdated resources, and not using the excellent MDN HTML reference. So most of the code I saw looked a lot like the photo above.
This resulted in unnecessary frustration and a poor mental model of HTML. In my mind the HTML I wrote looked something like this, and frighteningly I saw no problem with it at the time.
No wonder I didn’t want to write HTML. I coudln’t read my own code, and had no idea how to approach reading other people’s HTML! Not until my Mentor Derek over at PE took me under his wing and taught me how to actually read an HTML document. A perfect example of how a senior Developer can save someone time (opportunity cost!), money, and sanity, only one of which is relatively easy to get back!
With great power comes great responsibility
Yea, I stole that line from Spiderman’s father or something, so what? He was right! You as a developer have great responsibility in choosing the correct elements to describe your content to the browser. There is no reason in 2021 that you should be using divs
for everything. Dive into the Mozilla HTML reference, open up your favorite text editor ( I really like sublime) and have a go at creating semantic and accessible markup! The Web will be a better place for it.