LESSON 01 · BEGINNER4 min read

Start Here: Build Your First Web Page

A gentle, hands-on introduction to HTML: what it is, how tags work, and how to create a complete page you can open in your browser in the next five minutes.

HTML5 / Living StandardFree to readModule 1 of 8
YOUR NEXT SMALL WINS

By the end, you’ll be able to…

  • Explain what HTML is and what it is not
  • Write a complete HTML document with a heading, paragraph, link, and image
  • Open an HTML file in a browser and identify the head and body
  • Use tags, elements, and attributes correctly

01What HTML Actually Does

HTML stands for HyperText Markup Language. It is the language that gives a web page its structure. Every heading, paragraph, link, image, form, and video you have ever seen on the web is described with HTML.

HTML is not a programming language. It has no loops, variables, or calculations. It is a markup language: you wrap pieces of content in tags so the browser knows what each piece is. That makes HTML a friendly first step if you have never written code before.

Think of a web page like a house. HTML is the frame, walls, and rooms. CSS is the paint and furniture. JavaScript is the electricity and plumbing. A page can exist with HTML alone, but it cannot exist without it.

02Your First Complete Page

Create a new file called index.html. You can use Notepad, TextEdit, or a free editor such as VS Code. The .html ending matters: it tells your computer to open the file in a browser instead of a text editor.

Paste the code below into the file and save it. Every line has a job, and the first module explains each one in detail. For now, notice the pattern: an opening tag, some content, and a closing tag.

index.htmlHTML
<!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, world!</h1>    <p>I built this page with HTML.</p>    <a href="https://developer.mozilla.org/">Learn more on MDN</a>    <img src="https://placehold.co/320x160" alt="A simple placeholder image" />  </body></html>

03Tags, Elements, and Attributes

A tag is the piece of markup inside angle brackets, such as <p>. Most elements have an opening tag and a closing tag: <p> is the opening tag and </p> is the closing tag. The opening tag, the content, and the closing tag together form an element.

Attributes add extra information to an element. In <a href="https://example.com">, the href attribute tells the browser where the link should go. In <img src="photo.jpg" alt="A cat">, src points to the image file and alt describes the image for people who cannot see it.

Some elements are empty, which means they do not wrap around content. <img>, <br>, and <meta> are common examples. In HTML5 you can write them without a trailing slash, but either style works.

Elements can sit inside other elements. This is called nesting. Keep your nesting tidy: close the most recently opened element first, and indent child elements so the structure is easy to read.

index.htmlHTML
<p>This is a paragraph element.</p><a href="https://example.com">This link has an href attribute.</a><img src="photo.jpg" alt="A description of the image" />

04Open It in Your Browser

Save the file, then double-click index.html. It should open in your default browser. You can also drag the file into an open browser window or use File > Open.

You should see a large heading, a paragraph, a blue link, and a placeholder image. If you see the code instead of the page, the file probably has a .txt ending. Rename it so it ends in .html.

Edit the file, save it, and refresh the browser tab. That is the entire workflow for this course: write, save, refresh. No server or build step is required.

05What You Just Built

The <head> contains information about the page: the character encoding, the viewport settings for mobile, and the title shown in the browser tab. The <body> contains everything people actually see.

The <h1> is the main heading. The <p> is a paragraph. The <a> is a link. The <img> is an image. These are the building blocks you will combine for the rest of the course.

Open the page in your browser and use your keyboard to tab through it. Notice that the link receives a visible focus ring. That small detail is the beginning of accessibility, which you will study in depth later.

You now have a complete web page. The next lessons explain why the document starts with <!DOCTYPE html>, how the browser turns your text into the page you see, and how to structure real content with confidence.

LET IT CLICK

The ideas worth keeping.

  • HTML gives a page its structure; CSS adds visual design and JavaScript adds behaviour.
  • Elements are built from tags, content, and attributes.
  • The head describes the page; the body contains what people see.
  • Save the file, refresh the browser, and change one thing at a time.
TURN UNDERSTANDING INTO SOMETHING YOU CAN DO

Make it yours.

Edit the starter, press Preview, and see your page render in the browser preview. Compare with the worked solution when ready.

01

Exercise 1: Add a second paragraph

Add a second paragraph under the first one. Write one sentence about why you want to learn HTML.

your_turn_1.html🌐HTML
Ctrl + ↵
Preview
Press Preview to render your page
Press Preview to render your HTML in the browser preview.
Explore a worked solution
one_possible_solution.htmlHTML
<!DOCTYPE html><html lang="en">  <head>    <meta charset="UTF-8" />    <title>My first page</title>  </head>  <body>    <h1>Hello, world!</h1>    <p>I built this page with HTML.</p>    <p>I want to understand how the web works so I can build my own ideas.</p>  </body></html>

Each paragraph needs its own <p> element. Put the new element inside <body>, after the existing paragraph.

02

Exercise 2: Add a working link

Add a link to your favourite learning website. Give it visible text and check that the href points to the right address.

your_turn_2.html🌐HTML
Ctrl + ↵
Preview
Press Preview to render your page
Press Preview to render your HTML in the browser preview.
Explore a worked solution
one_possible_solution.htmlHTML
<!DOCTYPE html><html lang="en">  <head>    <meta charset="UTF-8" />    <title>My links</title>  </head>  <body>    <h1>Places I learn</h1>    <p><a href="https://developer.mozilla.org/">MDN Web Docs</a></p>  </body></html>

The href attribute holds the destination URL. The text between the opening and closing <a> tags is what people click.

A SMALL QUESTION. A USEFUL NEXT STEP.

What stayed with you?

Check the ideas while they’re fresh. Your answers stay in this page and feedback appears as you go.

A LITTLE ACTIVE RECALL0 / 4 answered
01What does HTML stand for?
02Which element represents the main heading of a page?
03Which attribute tells a link where to go?
04Which part of the document contains the content people see?

Keep exploring.

The official references behind this lesson, when you want a second angle or the full details.

One lesson closer.

Reading is a start. Trying it yourself makes the connection.

Completion is saved in this browser. It records reading and hands-on practice progress.