A little progress, every day.
All HTML lessons ↗
HTML foundations/Lesson 01◷ 12 min

Your first HTML page

Give a page its structure and tell the browser what it contains.

BEGINNER FRIENDLY
● Saved on this device
YOUR FIRST HTML PAGE · ABOUT 12 MINUTES
Checkpoint 1 of 5

What do you already know?

Distinguish information about a page from visible content

Before we start, a quick guess. A web page has a head and a body. Where would you put a welcome message people can read on the page? It is fine if this is new.

Where should a visible welcome message go?

The lesson waits for your answer. Voice and typed help use this checkpoint; use these checks to record your understanding.

COMPLETE LESSON · READ, LISTEN, THEN BUILD

Understand it, one idea at a time.

What you will be able to do
  • Explain what HTML does
  • Separate page information from visible content
  • Build and inspect a complete HTML document

Understand the document

HTML means HyperText Markup Language. It describes what content means and how it is organized. A heading, a paragraph, and a link have different jobs. CSS changes appearance; JavaScript adds behavior. You can make a useful document before adding either.

A tag is the notation, such as <p>. An element includes the opening tag, the content, and usually a closing tag: <p>Hello</p>. The slash marks the closing tag. Nesting means putting one element inside another. Close the inner element before closing its parent.

The doctype tells the browser to use modern HTML standards mode. The html element contains the document. Its lang attribute declares the language of the content, helping screen readers choose pronunciation. Attributes are extra information written inside an opening tag.

Worked example

<!doctype html>
<html lang="en">
  <head>...</head>
  <body>...</body>
</html>

Why it works: A predictable document structure makes your page easier to understand and maintain.

Pause and explain it yourself

In <p>Hello</p>, which part is the content and which part closes the element?

Compare your reasoning

Hello is the content. </p> is the closing tag. The entire expression is one paragraph element.

Section 1 of 3
✦ You don’t have to get it right the first time.
Practice stays on this device. Typed questions use Gemini. Voice conversations, lesson context and code go to ElevenLabs.Character: MakeHuman / MPFB · Asset credits