← Web design from scratch

Build the structure of your first page.

You already know HTML and CSS. Now we will bring that knowledge together to build a complete webpage using semantic HTML elements.

Level · BeginnerTime · 25–30 minPath · Web design

01

A website is made up of sections.

A professional webpage can usually be divided into blocks:

01

Header and navigation.

02

Main introduction.

03

Information about the project.

04

Services or content.

05

Call to action.

06

Footer.

HTML lets us represent that organisation using semantic elements.

02

What does semantic HTML mean?

Semantic HTML means using elements whose names describe their purpose on the page.

01

<header>

Represents a page or section header.

02

<main>

Contains the main content of the page.

03

<footer>

Represents a page or section footer.

A clear structure makes code easier to understand and describes the content correctly.

03

The website header.

Start by creating a header and navigation menu.

<header>

  <nav>
    <a href="index.html">My project</a>
    <a href="#about">About</a>
    <a href="#services">Services</a>
    <a href="#contact">Contact</a>
  </nav>

</header>

The nav element identifies a block of navigation links.

04

Create the main content.

After the header, add:

<main>

</main>

Inside main we will place the sections of our page.

A page should normally contain only one main element because it represents the main content.

05

Build the main introduction.

The first section usually explains what the website offers.

<section>

  <h1>Digital design for purposeful projects</h1>

  <p>
    We create clear, functional
    and professional digital solutions.
  </p>

  <a href="#services">View services</a>

</section>

Here we have three essential elements: a heading, an explanation and a call to action.

06

Add an About section.

Now create a second section.

<section id="about">

  <h2>About the project</h2>

  <p>We turn ideas into clear, professional digital experiences.</p>

</section>

We have added an identifier:

id="about"

This lets us link directly to the section:

<a href="#about">About</a>

07

Add a services section.

Use several article elements for independent pieces of content.

<section id="services">

  <h2>Services</h2>

  <article>
    <h3>Web design</h3>
    <p>Clear, professional websites.</p>
  </article>

  <article>
    <h3>SEO</h3>
    <p>Search engine optimisation.</p>
  </article>

</section>

08

Add a call to action.

A professional website should guide visitors towards the next step. Add a contact section:

<section id="contact">

  <h2>Have a project?</h2>

  <p>Tell us what you need and let's talk.</p>

  <a href="mailto:hello@example.com">Get in touch</a>

</section>

09

Finish with the footer.

The footer normally appears at the bottom of the page.

<footer>

  <p>© 2026 My project</p>

</footer>

Later we could add legal links, social media, contact information and other elements.

10

Your complete page.

Putting everything together gives us this structure:

<body>

  <header>
    <nav>...</nav>
  </header>

  <main>

    <section>Introduction</section>

    <section id="about">About</section>

    <section id="services">Services</section>

    <section id="contact">Contact</section>

  </main>

  <footer>Footer</footer>

</body>

We now have the skeleton of a complete webpage.

It may still look simple. That is normal: first build a correct structure, then work on the design.

What you have learned.

  • A webpage can be divided into sections.
  • Semantic HTML describes the purpose of content.
  • header represents the header.
  • nav contains navigation.
  • main contains the main content.
  • section organises content blocks.
  • article represents independent content.
  • footer represents the footer.
  • id attributes allow links to sections.

Build your website skeleton.

Open the my-first-website project from previous lessons. Replace the content of your body with:

  1. A header.
  2. A nav menu.
  3. A main element.
  4. A main section with h1.
  5. An About section.
  6. A Services section.
  7. A Contact section.
  8. A footer.

Use your own text. What matters now is building a clear structure.

Save this project. In the next lesson, we will use CSS to turn this structure into a visually designed webpage.

PREVIOUS LESSON

← 04 · What is CSS?