INTRODUCTION
HTML tags
Tags tell the browser what each part of a page is.
press Enter ↵
Ctrl + Enter shows it too
🔒 my-site/index.html

Press ▶ Show page to see your page here.

Lesson 45: HTML tags

Level 6, Make a Web Page. Titles, paragraphs and lists: tags open and close. The new word: tag. It follows lesson 44, How the web works. Next comes lesson 46, CSS: colours and style.

What the lesson explains

HTML tags. Tags tell the browser what each part of a page is.

Open and close. The words go between the opening and the closing tag. On the card: <h1>All about pets</h1>

What you do first

A smaller title. Add an <h2> that says My pets. One way: write in index.html: <h2>My pets</h2>. Then press Show page to see it.

The files on the practice computer

This lesson works in 0 folders. At the start, .

You change nothing here, so lesson 46 finds the same files.

The page on the screen

HTML tags. The page uses the tags <h1>, <p>, and its big title reads "All about pets".

Open and close. The page uses the tags <h1>, <p>, and its big title reads "All about pets".

What you practise

Try it, "A smaller title": Add an <h2> that says My pets. One way: write in index.html: <h2>My pets</h2>. Then press Show page to see it.

Try it, "Make a list": Make the list three items long. One way: write in index.html: <li>Dogs</li> / <li>Fish</li>. Then press Show page to see it.

Fix it, "Two bugs": Close the first <p>. One way: write in index.html: <p>I like cats.</p>. Then press Show page to see it. Then: Fix the title tag: h1 has a one, not an L. One way: write in index.html: <h1>Welcome</h1>. Then press Show page to see it.

Challenge, "A fact card": Make a fact card with a bold word. One way: write in index.html: <h2>Fun fact</h2> / <p>An octopus has <b>three</b> hearts.</p>. Then press Show page to see it.

What PlayBuddy and PlayType say

PlayBuddy: "Tags are like labels. They tell the browser what each part is."

PlayType: "Most tags come in pairs. The closing one has a slash."

Help in every lesson

Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.

A green ring shows where to click the first time. After that you do it on your own, and if you slip twice the ring comes back.

Stars

The lesson has 5 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.

About DayOneCode

DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.