HTML 101
The language of the internet: understand it from the ground up and build your very first website. No prior knowledge needed.
Completely new to this? Then start with Your first website, the short introduction in eight chapters. HTML 101 goes deeper afterwards.
Chapter 01
What is HTML?
The language of the internet — and why you need it.
Every part has its job. In HTML 101 you build the walls.
- HTML 101: build the house
- Bonus: address and going online
HTML stands for HyperText Markup Language – the language of the internet! Without HTML there is no website – it is the absolute foundation. Every page you have ever seen – Google, YouTube, all of them – is based on HTML!
Imagine a website as a house:
HTML = the framework, the walls
CSS = paint, decoration
JS = wiring, functions
Domain = street and house number (e.g. mykeyz.app)
Server = the plot of land the house stands on
→ Building the house (HTML)
→ Basic decoration (CSS intro)
In the bonus chapter:
→ Giving the house an address
→ Putting the house online
Chapter 02
Tools you need
The beauty of HTML — you need hardly anything!
An editor to write, a browser to look, one folder for everything.
myfirstsite/with images, css, jsWith the Live Server extension in VS Code, the browser reloads by itself after every change.
- Editor
- Browser
- folder with subfolders
The minimum:
✅ Computer (Windows, Mac or Linux)
✅ Text editor
✅ Browser
That's it! No expensive program, no subscription, no complicated setup!
Text editor — which one?
VS Code — Live Server extension:
→ Right-click index.html → "Open with Live Server"
→ The browser opens automatically
→ Changes in the code? The browser updates instantly! ✅
→ No more pressing F5 by hand!
Installing Live Server:
1. Open VS Code
2. Extensions icon (Ctrl+Shift+X)
3. Search for "Live Server" (by Ritwick Dey)
4. Click "Install" → done! ✅
Browser — which one?
Recommended for development:
Chrome / Edge / Brave / Vivaldi / Firefox → all with good developer tools ✅
Tip: Brave is a great choice! Chrome power + privacy!
Not recommended: Tor, DuckDuckGo → limited dev tools ⚠️
Pressing F12 opens the developer tools — see errors, inspect HTML, test CSS live, simulate the phone view. Your best tool!
Folder structure
├── index.html → home page
├── about.html → about us
├── content.html → content
├── contact.html → contact
├── images/ → all images
├── css/ → all CSS files
└── js/ → all JS files
- Download and install VS Code
- Install the Live Server extension
- Use Brave or Chrome for development
- Create the folder myfirstsite
- Create the subfolders images, css, js
- Open VS Code → open the folder
Chapter 03
The basic structure
Every HTML page needs a basic structure — like a house without furniture, but with walls, a roof and foundations.
First the announcement, then the invisible head, then the stage.
<!DOCTYPE html>announcement: this is HTML<html lang="en">wraps everything<head>invisible, for the browser<body>the stage, what you seeComments <!-- … --> are notes for you. The browser does not show them.
DOCTYPE html head bodymeta charsetmeta viewport
The magic basic structure
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My page</title> </head> <body> <!-- Your content goes here --> </body> </html>
<!DOCTYPE html> — Not an HTML tag but an announcement: "Hey, this is HTML5!" Always right at the top. Always. No exceptions.
<html lang="de"> — The root element. lang="de" tells the browser: the language is German. For English you write lang="en".
<head> — The invisible head. Visitors do not see what is in here — but the browser needs it.
<body> — The stage. Everything the visitor sees goes in here.
<!-- Comment --> — Notes for you — the browser ignores them completely.
There used to be HTML 4, XHTML 1.0, XHTML 1.1 — each version had a long, ugly DOCTYPE nobody knew by heart. HTML5 simplified this: one short DOCTYPE, for ever. Remember: always
<!DOCTYPE html> — never think about it again!Now you build!
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MyFirst Site – Home</title> </head> <body> <h1>Welcome to my first website!</h1> <p>I built this page myself. 💪</p> </body> </html>
MyFirst-Site/
├── index.html ✅
├── about.html ✅
├── content.html ✅
├── contact.html ✅
├── images/ (still empty)
├── css/ (still empty)
└── js/ (still empty)
Chapter 04
Text, links and images
The heart of every website — after this chapter your MyFirst Site comes to life!
Three building blocks bring your page to life.
h1 to h6, p, strong, ema href: internal or externalimg src and altOnly one <h1> per page.
h1 h2 p strong em bra hrefimg src alt
Text
Headings <h1> to <h6> — h1 is the largest, h6 the smallest. Important rule: only one <h1> per page!
Paragraphs <p> — every paragraph gets its own <p> tag.
Bold + italic — <strong> for bold, <em> for italic.
Line break <br> — a self-closing tag, no </br> needed!
<h1>This is me – biggest heading</h1> <h2>My hobbies</h2> <p>HTML is <strong>important</strong> for every web developer.</p> <p>CSS makes the page <em>beautiful</em>.</p> <p> Jane Doe<br> 1 Example Street<br> 9000 St. Gallen </p>
Links
<a> stands for anchor. href = hypertext reference — where should the link point?
<!-- External link --> <a href="https://google.com">To Google</a> <!-- Internal link --> <a href="about.html">About me</a> <!-- Open in a new tab --> <a href="https://google.com" target="_blank">Google (new tab)</a>
Images
<img src="images/photo.jpg" alt="Description" width="300">
Chapter 05
Lists and tables
Bring structure to your content — perfect for lists, steps and comparisons.
Order matters: ol. Order does not matter: ul. Comparisons: table.
olnumberedulbulletstabletrth header, td contentul ol litable tr th td
<ul> = unordered list — a list with bullet points, no order
<ol> = ordered list — a list with numbers, in order
<li> = list item — a single item in the list
When <ul>, when <ol>? Order matters → <ol>. Order does not matter → <ul>.
<!-- Unordered --> <ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> <!-- Ordered --> <ol> <li>Install VS Code</li> <li>Install Live Server</li> <li>Create your first HTML file</li> </ol>
Tables
<table border="1"> <tr> <th>Name</th> <th>Age</th> <th>City</th> </tr> <tr> <td>Max</td> <td>25</td> <td>Zurich</td> </tr> </table>
Chapter 06
Navbar
The navigation of your website — it appears on every page and connects everything.
The same bar on every page. <nav> says: this is the navigation.
<nav>index.htmlabout.htmlcontent.htmlcontact.htmlIf the navbar is missing on a page, you cannot get away from there.
nav ul li a- four pages
Navbar = navigation bar — the strip of links you see at the top of almost every website. In HTML we build it with the <nav> tag.
Semantic means: the code describes what something is, not just how it looks.
Navbar variations
<nav> <a href="index.html">Home</a> | <a href="about.html">About me</a> | <a href="content.html">Content</a> | <a href="contact.html">Contact</a> </nav> <hr>
<nav> <ul> <li><a href="index.html">Home</a></li> <li><a href="about.html">About me</a></li> <li><a href="content.html">Content</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav>
Chapter 07
Form
A contact form is on almost every website — after this chapter you will have one!
The form collects the input. It can only send it with a server or a service.
input, textarea, selectbutton type="submit"label for and id must have the same name.
form label inputtextarea select buttonrequired
Form elements:
<input type="text"> — single-line text field (self-closing!)
<input type="email"> — email field with validation
<input type="checkbox"> — checkbox
<textarea> — multi-line text field (has </textarea>!)
<select> — drop-down menu
<button type="submit"> — submit button
required — required field: submitting it empty shows an error message
<label for="name"> — the label: for="name" and id="name" must match!
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MyFirst Site – Contact</title> </head> <body> <nav> <a href="index.html">Home</a> | <a href="about.html">About me</a> | <a href="content.html">Content</a> | <a href="contact.html"><strong>Contact</strong></a> </nav> <hr> <h1>Contact</h1> <form> <label for="name">Your name:</label><br> <input type="text" id="name" name="name" placeholder="Jane Doe" required> <br><br> <label for="email">Your email:</label><br> <input type="email" id="email" name="email" placeholder="you@example.com" required> <br><br> <label for="message">Your message:</label><br> <textarea id="message" name="message" rows="5"></textarea> <br><br> <button type="submit">Send 📬</button> </form> </body> </html>
<input type="checkbox"> with the text "I have read the privacy policy" — and make it required!Chapter 08
Putting MyFirst Site together
All the pages are built — now we polish everything and complete MyFirst Site!
Check every page the same way before calling it done.
footer hr- first inline CSS
What does "putting it together" mean?
→ Are all pages consistent? (same navbar, same structure)
→ Are all links correct?
→ Is content missing anywhere?
→ Does everything look tidy?
In web development this is an important step — it is called review or QA (quality assurance)!
Adding a footer
<footer> <hr> <p>© 2025 MyFirst Site – Built with ❤️ during HTML 101</p> </footer>
A first taste: inline CSS
<body style="background-color: black; color: white;">
Chapter 09
Testing
Before a page goes online, a professional checks everything systematically.
Before the page goes online, you check it step by step.
- developer tools
validator.w3.org
Opening the page without Live Server: Simply double-click the HTML file! For HTML 101 a double-click is all you need!
Open the DevTools (F12):
1. Responsive test — click the phone icon → simulate the phone view
2. Inspect HTML — right-click → "Inspect"
3. Error console — "Console" tab → red errors = something is not right!
W3C Validator: validator.w3.org — paste your code in → errors are explained. No red errors = clean HTML!
Bonus
Domain + hosting
MyFirst Site runs locally — now we put it online for the whole world!
Hosting means: your files sit on a server that runs around the clock.
Your own domain like yourname.ch: the address of the house, costs every year.
Upload only the folder, not the index.html separately as well.
- Netlify account
- your folder
Domain = address | Hosting = plot of land | Now it becomes real!
Domain = your address on the internet (e.g. myname.ch or myfirstsite.com)
A .com domain costs about CHF 10–15 a year!
Hosting = your files sit on a server that is online 24/7.
Free hosting — perfect for getting started: Netlify! You drag your folder in — done. No configuration, no command line!
Putting it online with Netlify
- netlify.com → create a free account
- Log in → "Add new site" → "Deploy manually"
- Drag the whole MyFirst-Site folder into the window — not just a single file!
- Wait a moment… Done!
- Netlify shows your URL — click on it! (do not type it in yourself)
SSL / HTTPS — Netlify automatically gives you an SSL certificate. The padlock means: the connection is encrypted. Visitors do not need to log in! = secure, not = locked!
Updating the page: Make changes locally → in Netlify go to "Deploys" → drag the folder in again → done!
This is not an exercise any more — this is a real website!
- Building the HTML basic structure
- Adding text, links and images
- Building lists and tables
- Navbar and footer on all pages
- Contact form with required fields
- Testing pages professionally
- Putting the page online with a real URL
CSS 101 — now MyFirst Site gets really beautiful! Colours, fonts, layout, animations...
→ To CSS 101