What is HTML
Every website you've ever visited starts life as a plain text document written in HTML. The headings, paragraphs, buttons, images, and links you see on a page are all described in this one language.
Before you can style a page or make it move, you have to say what's on it. That description is HTML.
A page is structured text
HTML stands for HyperText Markup Language. The word that matters is markup.
You take plain text and mark up which parts are headings, which are paragraphs, which are links. You're not giving the computer instructions to follow. You're labelling content so the browser knows what each piece is.
Think of formatting a document by hand. You circle the title, underline the section headings, draw a box around a photo. HTML is how you do that circling and underlining in a way a browser understands.
<h1>Welcome</h1>
<p>This is a paragraph of text on my first web page.</p>Two lines, two pieces of structure: one heading and one paragraph. The browser reads the labels and shows the first line large and bold, the second as ordinary body text.
If that feels too simple to be the real answer, it isn't. I spent my first week looking for the complicated part, and there wasn't one.
Elements, tags, and attributes
Most of HTML is made of elements. An element usually has an opening tag, some content, and a closing tag:
<p>Hello there.</p><p> is the opening tag, </p> is the closing tag (note the slash), and "Hello there." is the content in between. Together they make a paragraph element. The tags are the labels, and the content is what your visitor actually reads.
You can also give a tag extra information with an attribute, written as a name="value" pair inside the opening tag. A link needs to know where it goes, so you tell it with href:
<a href="https://scrimba.com">Visit Scrimba</a>A few elements have no content at all, so they have no closing tag either. These are void elements, and you'll meet them constantly: <img>, <br>, <input>, <hr>. Everything they need lives in their attributes, so there's nothing to wrap and nothing to close.
<img src="golden-retriever.jpg" alt="A golden retriever sitting in tall grass"><p>...</p>. Attributes go in the opening tag and add details, like where a link points. Please don't try to memorise every tag. There are over a hundred and nobody holds them all in their head. You'll pick up the handful you need, and look up the rest forever, same as the rest of us.
How HTML, CSS, and JavaScript split the work
A finished web page is usually built from three languages, and each has one job:
- HTML is the structure: the headings, text, images, and buttons.
- CSS is the style: the colours, fonts, spacing, and layout.
- JavaScript is the behaviour: what happens when you click, type, or scroll.
Here's the picture I always come back to. HTML is the walls and rooms of a house, CSS is the paint and the furniture, and JavaScript is the electricity that makes things switch on.
You're learning the walls first, because there's nothing to paint or wire up until the structure exists.
Keeping the three separated is a habit worth building early. When your content lives in HTML, your presentation in CSS, and your behaviour in JavaScript, you can change any one of them without disturbing the other two.
Once these walls are up, the paint and the wiring have somewhere to go. And you can build a real, useful page with nothing but this layer, which is a nice thing to know when the other two feel far away.
Your first look at a full page
Here's a complete web page, tiny but real. You'll meet every part of it properly over the next few chapters, so don't worry about the details yet. For now, notice that it's all built from the tags and attributes you've already seen:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>My first page</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is a paragraph of text on my first web page.</p>
</body>
</html>Read it from the top. The first line tells the browser this is a modern HTML page. <html> wraps everything. <head> holds behind-the-scenes information like the page title, and <body> holds what you actually see.
The heading and paragraph from earlier live inside the body, because they're content for your visitor. That split, information about the page against content of the page, is the first structural decision every document makes.
The next chapter, on your first HTML page, takes this skeleton apart line by line.
<html> wrapping a <head> and a <body>. The head is behind-the-scenes info, the body is what people see. You'll take this apart properly in the next chapter, so a quick look is all you need right now. It looks like a lot the first time and it stops looking like anything at all by about the fifth.

