Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Multipage Website Development

Author: Sophia

what's covered
In this lesson, you will learn how to build a complete multipage website by creating multiple HTML files and connecting them with consistent navigation. Specifically, this lesson will cover the following:

Table of Contents

1. Planning Site Structure

Before writing any code, successful web developers plan their website structure. A multipage website consists of two or more HTML documents linked together through navigation, allowing users to move between different sections of content.

term to know
Multipage Website
A website composed of two or more separate HTML files that are connected through navigation links.

1a. Pages and Purpose

Every website serves a purpose, and each page has a specific role. When planning a multipage website, start by identifying the core pages your site needs.

A typical small website includes these essential pages:

  • Home page (index.html): The main entry point that welcomes visitors and provides an overview of the site
  • About page (about.html): Information about the person, company, or organization behind the site
  • Contact page (contact.html): Ways for visitors to get in touch, such as email addresses or contact forms
  • Services or Products page: Details about what you offer (if applicable)
  • Portfolio or Gallery page: Examples of work or visual content (if applicable)
key concept
The home page file must be named index.html. Web servers automatically look for this filename when visitors access the root address of a site. If the home page is named differently, the browser may not load the correct page.

When defining your pages, consider what information visitors need. A portfolio website might include Home, Portfolio, About, and Contact pages, while a small business site might add Services and Testimonials pages.

1b. Site Maps

After deciding on your pages, create a simple site map. A site map is a visual diagram that shows all pages in your website and how they connect through navigation.

For a basic multipage website, the structure often looks like this:

A simple website structure diagram: index.html (Home) branching into about.html, services.html, and contact.html.

In this structure, every page connects directly to the home page. This keeps navigation simple and makes linking between pages easier. Most small websites use this straightforward approach.

try it
Choose a simple website idea such as a personal portfolio, hobby site, or small business site.

  1. List three to four pages your site will include.
  2. Assign a filename to each page.
  3. Write one sentence describing the purpose of each page.
What might a personal portfolio site map look like?
A personal portfolio might include:

  • index.html: Home page introducing you and highlighting recent work
  • projects.html: A showcase of completed projects
  • about.html: Background, skills, and experience
  • contact.html: Email address and professional profile links

term to know
Site Map
A visual diagram that shows all pages in a website and illustrates how those pages connect to each other through navigation.


2. Project Folder Setup

With your site planned, you will now create and organize your project files inside your Codespace. Keeping your files organized from the beginning prevents broken links and makes navigation easier to manage.

2a. Folder Structure

In Codespaces, your GitHub repository serves as the project for your multipage website. The top-level directory shown in the Explorer panel is your project’s root folder. All primary website files should be created directly inside this location unless you intentionally create subfolders later.

Organizing your files carefully from the beginning helps prevent broken links and keeps your project manageable as you add more pages.

step by step
To set up your multipage website in Codespaces:

  1. Open your repository in Codespaces.
  2. In the Explorer panel, confirm you are in the top-level directory.
  3. Create a new file named index.html if it does not already exist.
  4. Create additional HTML files such as about.html, projects.html, and contact.html in the same location.

EXAMPLE

Codespaces Explorer showing HTML files stored directly in the project root folder.

In the Explorer panel, the repository name appears at the top. All website files are stored directly beneath it at the top level.

In the example shown, the repository is named MY_FIRST_WEBSITE, and the HTML files appear directly inside it:

  • index.html
  • about.html
  • contact.html
The README.md file is part of the repository but is not part of the website itself.

Keeping all HTML files at the same level in the project root simplifies navigation and makes relative paths easier to manage. As your projects become more complex, you will organize files into subfolders of the project root folder such as images, css, or scripts to keep your work structured and scalable.

term to know
Project Root Folder
The main directory that contains all files for a website; also called the root folder or project directory.

2b. File Naming

You previously learned that clear and consistent file naming improves organization. In a multipage website, filenames also determine your page URLs and navigation links.

Because filenames appear directly in web addresses, they should be simple, descriptive, and consistent.

Follow these conventions when creating HTML files in Codespaces:

  • Use all lowercase letters, such as about.html.
  • Use hyphens to separate words, such as contact-us.html.
  • Choose descriptive names that reflect the page’s content.
  • Always name your home page index.html.
key concept
Filenames appear in your website’s URLs. For example, a file named about.html creates a URL such as yoursite.com/about.html. Clear naming improves usability and professionalism.

hint
Avoid spaces in filenames. Browsers convert spaces to %20, making addresses harder to read and share.


3. Building HTML Pages

You have already created structured pages with navigation links. Now, you will refine and expand your work into a complete multipage website with consistent layout and navigation across all pages.

The goal is to ensure that every page feels like part of the same site.

3a. Home Page

before you start
Open your existing index.html file in Codespaces. Confirm that it includes:

  • A complete HTML document structure
  • A <header> containing your site title and navigation menu
  • A <main> section with page-specific content
  • A <footer>

Your home page serves as the template for the rest of your website. Its structure should remain consistent across all other pages.

step by step
  1. Review the structure of index.html.
  2. Confirm that your <nav> menu includes links to all current pages (index.html, about.html, contact.html).
  3. Preview the page in Codespaces.
  4. Click each navigation link to confirm it works correctly.
  5. If any links are broken, correct them now before continuing.

GitHub Codespaces displaying index.html with a semantic HTML structure including a header and a nav element containing an unordered list of links to index.html, about.html, projects.html, and contact.html, followed by the main and footer sections. The Explorer panel shows multiple HTML files stored in the project root.

3b. Additional Pages

You already created about.html and contact.html in the previous lesson. Now, you will expand your website beyond a basic three-page structure.

Most multipage websites include additional pages such as:

  • projects.html
  • services.html
  • gallery.html
  • blog.html
Adding new pages allows you to organize content clearly and scale your site.

try it
Add one new page to your website.

  1. In Codespaces, create a new file (for example, gallery.html).
  2. Copy the structural layout from index.html, including the <header>, <nav>, <main>, and <footer>.
  3. Update the <title> to reflect the new page name.
  4. Replace the content inside <main> with information specific to the new page.
  5. Add a link to this new page in the navigation menu on all existing pages.
  6. Preview your site.
  7. Test navigation in both directions to confirm all links work correctly.
What should remain the same across pages?
The <header>, <nav>, and <footer> should remain consistent across all pages. Only the <title> and <main> content should change to reflect the purpose of each page.

watch
In this video, you will learn how to create a new web page, link it to your site, and preview the changes.

big idea
A cohesive multipage website maintains a consistent structural framework across all pages while allowing each page’s main content to serve a unique purpose.


4. Consistent Navigation

As your website grows, maintaining consistent navigation becomes essential. Every page should allow visitors to move easily between sections without confusion or broken links.

Your navigation menu should:

  • Appear in the same location on every page
  • Include the same set of links
  • Use consistent structure and formatting
When you add a new page, you must update the navigation menu on every existing page. Navigation does not update automatically in HTML. Each file must be edited manually.

step by step
  1. Add a new link to your navigation menu in one file (for example, index.html).
  2. Copy the updated <nav> element.
  3. Paste it into the <header> of every other page.
  4. Preview each page in Codespaces.
  5. Click every navigation link to confirm that all pages connect correctly.

After updating navigation, test your entire site carefully.

  • Click each link from every page.
  • Confirm that filenames are spelled correctly.
  • Verify that relative paths point to the correct location.
try it
Intentionally change one navigation link to an incorrect filename.

Preview the page and observe what happens.

Then correct the link and test again.
What causes most broken links in a multipage site?
Broken links are typically caused by misspelling filenames, using incorrect relative paths, or forgetting to update navigation across all pages.

big idea
A cohesive multipage website requires ongoing consistency. Every time you add or modify a page, you must verify that navigation remains accurate across the entire site.

summary
In this lesson, you learned how to move from individual pages to a cohesive multipage website. You began with planning site structure, identifying pages and purpose and organizing your ideas with site maps to create a clear blueprint for your site. You then focused on project folder setup, establishing proper folder structure in Codespaces and applying consistent file naming conventions to support clean URLs and reliable linking. Next, while learning how to build HTML pages, you refined your home page and expanded your site by creating additional pages that maintain a consistent layout while presenting unique content. Finally, you reinforced consistent navigation, ensuring that every page includes identical navigation links and that all connections function correctly across your entire website.

Source: THIS TUTORIAL WAS AUTHORED BY SOPHIA LEARNING. PLEASE SEE OUR TERMS OF USE.

REFERENCES

Mozilla Developer Network. (2025, December 19). How the web works. developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/How_the_Web_works

Terms to Know
Multipage Website

A website composed of two or more separate HTML files that are connected through navigation links.

Project Root Folder

The main directory that contains all files for a website, also called the root folder or project directory.

Site Map

A visual diagram that shows all pages in a website and illustrates how those pages connect to each other through navigation.