HTML Tutorial / Build a Small Multipage Website
A small multipage site brings together document structure, semantic regions, links, and forms. In this project you will create Home, About, and Contact pages in one folder, navigate among them, and check the result. HTML alone cannot receive or store contact messages, so the form here is an input demonstration, not a working contact service.
Prepare the files
Create a new folder and save these three UTF-8 plain-text files inside it. Their filenames must match the menu's href values exactly. First compare how relative paths resolve from file locations in Links: Paths, Page Fragments, and Email.
small-site/
index.html
about.html
contact.html
Make sure the editor did not append another extension such as .txt. Keeping all three files together lets href="about.html" find the About page using a relative path. If you later move a file into another folder, update the relevant links. Finish the text-only version first; then you can add images you have the right to use, with appropriate alt text.
Create the home page
Save the following complete document as index.html. Use the same three menu destinations on every page. The roles of header, nav, and main follow the semantic layout in Divide a Page with Semantic Elements.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home | Small Garden</title>
<meta name="description" content="Home of the Small Garden practice site, with links to About and a contact-form exercise.">
<style>
body { margin: 1rem; font-family: sans-serif; line-height: 1.6; }
nav a { display: inline-block; margin: 0 .5rem .5rem 0; }
nav a[aria-current="page"] { font-weight: bold; }
textarea, input { max-width: 100%; box-sizing: border-box; font: inherit; }
textarea { width: 24rem; }
:focus-visible { outline: 3px solid #005fcc; outline-offset: 3px; }
</style>
</head>
<body>
<header>
<nav aria-label="Main navigation">
<a href="index.html" aria-current="page">Home</a>
<a href="about.html">About</a>
<a href="contact.html">Contact</a>
</nav>
</header>
<main>
<h1>Small Garden</h1>
<p>A short guide for people starting to grow plants.</p>
</main>
<footer><p>Small Garden practice</p></footer>
</body>
</html>
Opening index.html should show a menu and the “Small Garden” heading. The About and Contact links will not work until you create their files in the same folder. The h1 here belongs to the example page, not to this tutorial post.
Create the About and Contact pages
Save the following complete document as about.html. It keeps the same menu destinations while giving About its own title, description, and current-menu state. The distinction between inspecting GET values and receiving messages follows the request explanation in Form Structure and GET vs. POST.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About | Small Garden</title>
<meta name="description" content="An introduction to the Small Garden practice site for people beginning to grow plants.">
<style>
body { margin: 1rem; font-family: sans-serif; line-height: 1.6; }
nav a { display: inline-block; margin: 0 .5rem .5rem 0; }
nav a[aria-current="page"] { font-weight: bold; }
textarea, input { max-width: 100%; box-sizing: border-box; font: inherit; }
textarea { width: 24rem; }
:focus-visible { outline: 3px solid #005fcc; outline-offset: 3px; }
</style>
</head>
<body>
<header>
<nav aria-label="Main navigation">
<a href="index.html">Home</a>
<a href="about.html" aria-current="page">About</a>
<a href="contact.html">Contact</a>
</nav>
</header>
<main>
<h1>About</h1>
<p>Small Garden is a practice site for people beginning to grow plants.</p>
</main>
<footer><p>Small Garden practice</p></footer>
</body>
</html>
Save the following complete document as contact.html. Its practice form submits to the current document using GET and does not deliver a real message.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Contact | Small Garden</title>
<meta name="description" content="Practice entering and validating a name and test message without delivering a real contact request.">
<style>
body { margin: 1rem; font-family: sans-serif; line-height: 1.6; }
nav a { display: inline-block; margin: 0 .5rem .5rem 0; }
nav a[aria-current="page"] { font-weight: bold; }
textarea, input { max-width: 100%; box-sizing: border-box; font: inherit; }
textarea { width: 24rem; }
:focus-visible { outline: 3px solid #005fcc; outline-offset: 3px; }
</style>
</head>
<body>
<header>
<nav aria-label="Main navigation">
<a href="index.html">Home</a>
<a href="about.html">About</a>
<a href="contact.html" aria-current="page">Contact</a>
</nav>
</header>
<main>
<h1>Contact-form practice</h1>
<p>This example does not deliver a message. Use test text only.</p>
<form method="get">
<p><label for="visitor-name">Name</label>
<input id="visitor-name" name="name" required></p>
<p><label for="message">Message</label>
<textarea id="message" name="message" rows="4" required></textarea></p>
<button type="submit">Inspect entered values</button>
</form>
</main>
<footer><p>Small Garden practice</p></footer>
</body>
</html>
Each block is a complete document, so save it as the whole file instead of nesting another html or main inside an existing copy. Keep the same menu destinations, but put aria-current="page" only on the link representing that document.
“Inspect entered values” does not send a message to anyone. The browser checks the required fields and submits to the current document using GET. Test with placeholder text only, because submitted values may appear in the URL. A real contact service needs a server handler, privacy protections, spam controls, and a clear success or failure response.
| Finished page | Visible content | Current menu |
|---|---|---|
| index.html | Small Garden heading and introduction | Home |
| about.html | About heading and site description | About |
| contact.html | Contact-form practice heading, name, message, and submit button | Contact |
Use this table to compare the finished screens. The current link appears bold, while aria-current communicates its status independently of that visual treatment.
Check completion criteria and optional extensions
| Check | Completion criterion | If it fails |
|---|---|---|
| Navigation | Every page links to both other pages | Filenames, directories, and each file's href |
| Current location | Only the current page link has aria-current="page" | Whether a copied Home state remains on other pages |
| Metadata | Distinct titles/descriptions and correct language/encoding | The different roles of head and html |
| Form input | Required empty values are blocked; inspect test GET entries | name, required, and the input constraints |
| Reading and interaction | Core content remains usable with keyboard, narrow width, and zoom | Focus, overflow, and incorrect nesting |
Complete the baseline before adding one extension at a time: a useful list on About, an image with appropriate alt text, or optional information in details. Repeat navigation, syntax, and keyboard checks after each addition so a new issue can be traced to one change.
When updating a shared menu, update all three copies but place aria-current on the appropriate link in each one. Retest relative paths after deployment: filename case and the deployment directory can differ from the local environment.
Check the finished site
- Open
index.htmland confirm that every menu link opens the correct file. - From About and Contact, navigate to both other pages too; do not test only the home menu.
- Check that each tab title and visible
h1describe that page. - Use
Tabto reach every link and contact-field control. - Try submitting empty fields, then enter test values and observe the URL.
- Check each file with the Nu HTML Checker, fix errors, and check again.
If a link fails, check the filename and relative path first. When you edit a shared menu, update all three copies. As a site grows, maintaining repeated markup consistently becomes important. In this exercise, a form that does not actually deliver a message is expected; the goal is to build and verify the HTML interface. Separate validator results from real behavior using the guidance in Find Errors and Validate an HTML Document.




