HTML — HyperText Markup Language — is the language every website is built on. It isn't a programming language; it's a markup language that describes the structure and meaning of content: this is a heading, that is a paragraph, here is a link. The browser reads your HTML and turns it into the page you see. In this chapter you'll write a real page from an empty file.
What is HTML?
Every page you visit arrives as a text document full of tags. Tags label the content so the browser knows how to render it and so screen readers, search engines and other tools can understand it. HTML handles structure; CSS handles how it looks; JavaScript handles behaviour. Keep those three jobs separate and your projects stay maintainable.
Elements, tags & attributes
An element is usually an opening tag, some content, and a closing tag. The closing tag repeats the name with a leading slash:
<p>This is a paragraph.</p><!-- ↑ open tag ↑ close tag -->
Elements can carry attributes — extra information written inside the opening tag as name="value" pairs. The anchor below uses an href attribute to say where the link points:
<a href="https://alberoacademy.com">Visit Albero</a>
A few elements are empty (also called void) — they hold no content and have no closing tag, like the line break and the image tag:
<br><img src="logo.png" alt="Albero Academy logo">
The document skeleton
Every HTML file shares the same five-part skeleton. Learn it once and you'll type it on autopilot forever:
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>My First Page</title></head><body><h1>Hello, Albero!</h1><p>This is my first web page.</p></body></html>
| Part | What it does |
|---|---|
<!DOCTYPE html> | Tells the browser to use modern (HTML5) rules. |
<html lang="en"> | The root of the page; lang helps search engines & screen readers. |
<head> | Metadata the visitor never sees directly — title, character set, links. |
<body> | Everything visible on the page lives here. |
<title> | The tab name and the headline in Google's results. |
Your first page
Create a file named index.html, paste the skeleton above, and open it by double-clicking the file — it launches in your browser, no server needed. Change the <h1> text, save, and refresh to see it update. That edit-save-refresh loop is the heartbeat of front-end work.
Headings run from <h1> (most important) down to <h6>. Use exactly one <h1> per page and don't skip levels — headings are an outline, not a font-size picker.
<h1>Data Analytics Programme</h1><h2>What you'll learn</h2><p>Excel, SQL, Power BI and Python — on real datasets.</p><h2>Who it's for</h2><p>Beginners who want a job-ready analytics portfolio.</p>
What lives in the head
The <head> holds information about the page rather than page content. Two lines belong on every page you ever write:
<meta charset="UTF-8">— lets the page display every character, from accents to emoji, correctly.<meta name="viewport" …>— makes the page scale properly on phones. Without it, mobile browsers pretend they're a desktop and shrink everything.
The head is also where you link a stylesheet and set the description search engines show. You'll meet those in the CSS course and the SEO chapter.
Practice
Build a tiny "About me" page from scratch. Give yourself these constraints:
- One
<h1>with your name and two<h2>sections. - A short paragraph under each heading.
- A correct, complete skeleton — validate it by pasting into the W3C validator when you're done.
Key takeaways
- 01HTML marks up structure and meaning — not appearance. Looks are CSS, behaviour is JavaScript.
- 02An element is open tag + content + close tag; empty elements like <img> and <br> have no close tag.
- 03Attributes add information inside the opening tag as name="value" pairs.
- 04Every page uses the same skeleton: doctype, html, head, body.
- 05Always include the UTF-8 charset and the viewport meta tag.
