I'll never forget the first time I saw HTML do something âreal.â I was in a high school computer lab, and the teacher told us to open Notepad, type <h1>Hi</h1>, and save it as index.html. When I doubleâclicked that file and a clean web page popped up with a big bold âHi,â I felt like Iâd just hacked the Matrix.
But hereâs the truth: HTML isnât magic. Itâs actually the simplest âlanguageâ youâll ever meetâso simple that programmers donât even call it a programming language. Itâs a markup language. That just means itâs a way to put labels on text so the browser knows whatâs a heading, whatâs a paragraph, and whatâs a link.
Think of it like this: if a website were a house, HTML would be the wooden frameâthe walls, the doors, the roof. No paint, no furniture, no fancy curtains (thatâs CSS and JavaScript). Just the structure that holds everything together.
You might be thinking, âCool story, but do I really need to learn this?â
Well, if you ever want to:
âŠthen HTML is your starting line. The best part? You can learn the core stuff in an afternoon. And nobodyânobodyâmemorizes every tag. Iâve been doing this for years and I still Google âHTML how to make a dropdownâ at least twice a week.
Open Notepad (or TextEdit on a Mac, or VS Code if youâre feeling fancy). Copy this codeâbut seriously, type it yourself. Your fingers will thank you later.
Save the file as my-first-site.html (make sure it ends with .html, not .txt), then doubleâclick it. Your browser will open it, and boomâyouâve just published your first webpage.
Notice how:
<h1> and <h2> give you differentâsized headings.<ul> with <li> creates bullet points.<a href=""> turns text into a clickable link.You donât need to learn a hundred tags to be dangerous. Here are the ones I use almost every day.
<h1> â <h6>)Think of <h1> as the title of a bookâyou usually only use it once per page. <h2> is like a chapter title, <h3> a subâchapter, and so on. They help search engines (and screen readers) understand what your page is about.
<div><div> looks like it does nothing. Itâs just a container. But thatâs exactly why itâs so powerful. If you want to group a bunch of elements togetherâsay, to move them around or style them laterâyou wrap them in a <div>. Itâs your invisible box.
<img>)Images are a little different: they donât have a closing tag.
<img src="your-image.jpg" alt="A description of the image">
The alt text is what shows up if the image fails to load, and itâs how someone using a screen reader âseesâ your picture. Always include itâitâs a good habit.
Youâve got your first page. Now what?
</h1> and see what happens. Change the <ul> to <ol> and watch the bullets turn into numbers. Breaking things is how you really learn.For now, just play with it. Change the text, add a new list item, maybe throw in an image. Youâre not just browsing the web anymoreâyouâre one of the people who builds it.