Coding Lesson

← All lessons

HTML: Structure

Build your HTML hobby page

Lesson 6 of 18 · About 20 minutes

Your goal: Combine the HTML skills without copying a complete answer.

Learn

This is your first small project. Instead of changing isolated tags, you will combine headings, paragraphs, a list and a link into one page that helps someone understand your hobby. Begin with meaningful content; styling comes in the next stage.

Walkthrough: why the code works

  1. Use the starter as a container

    The starter already has header, main and footer inside body. Header introduces the page, main holds its central content, and footer provides closing information. The comment inside main is an instruction for you; comments are not displayed as page text. Replace it with your sections.

  2. Write a helpful introduction

    Change the h1 to a specific hobby and write a short introduction. Think of someone who has never tried it. Explain what they will learn from this page. Update title in head too: it names the standalone browser tab, while h1 is the heading on the page.

  3. Build two sections with different purposes

    For a gardening page, explain why you enjoy it in one section and what a beginner needs in another. Give each section an h2 and a paragraph. You can wrap each heading and its related content in section; keep those sections inside main.

    <section>
      <h2>What you need</h2>
      <p>Start with a few simple supplies.</p>
      <ul>
        <li>A pot</li>
        <li>Soil</li>
        <li>Seeds</li>
      </ul>
    </section>
  4. Add resources where they help

    Place a descriptive link near the content it supports. Check the destination instead of leaving an unrelated sample link. An image is optional: add one only when you have a working image and an accurate alternative description. The text should still make sense without the picture.

  5. Review and keep this milestone

    Run the page, read it from top to bottom and test the link in a normal browser tab. Check that the footer comes after main. Download this version before moving to CSS. In the next lesson use Open HTML file to continue your own work; the supplied starter is a separate practice example.

Expected results

  • Your page contains one clear main topic and two sections, each with a paragraph.

  • A list makes related information easy to scan and a descriptive link leads to a checked resource.

  • The page is readable before any CSS is added, and your downloaded copy contains the same content.

Common mistakes and how to fix them

  • The sample answer replaced the whole file: The answer is a body-content example. Keep your document’s doctype, html, head and body structure around it.

  • Every section says the same thing: Give each section a different reader question to answer, such as What do I need? and How do I start?

  • The next lesson starts with generic content: Open your downloaded HTML in the Sandbox to continue your hobby project. Lesson starters are not automatically your previous work.

View starter code
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>My hobby page</title>
    <style></style>
  </head>

  <body>
    <header>
      <h1>My hobby</h1>
    </header>
    <main>
      <!-- Add your sections here -->
    </main>
    <footer>
      <p>Made by a beginner</p>
    </footer>
  </body>
</html>

Your challenge

Build two sections with paragraphs, a list, and a descriptive link. Add an image if you have one. Download this version.

Keep developing your hobby page: Download HTML before leaving the sandbox, then choose Open HTML file when returning to your project. Load saved draft restores only this lesson’s draft in this browser.

Practise in the sandbox
Show a hint

Start with the sections. Add the list and link after the text makes sense.

Show a sample answer

Try the challenge first. This is one possible answer or a snippet to adapt.

<header>
  <h1>Gardening</h1>
</header>
<main>
  <h2>Why I enjoy it</h2>
  <p>I like growing food.</p>
  <h2>What you need</h2>
  <ul>
    <li>Seeds</li>
    <li>Soil</li>
  </ul>
  <a href="https://playcode123.com/">Learn web skills</a>
</main>
<footer>
  <p>My first HTML project</p>
</footer>

Check your work

Your page has a clear topic, two sections, a list, a working link and a footer.

Completion is your own check, not an automatic grade.