24 min read
Building a Multi-Page Site
Give every page the same header, logo, navigation bar and footer, change only the main content, and link the pages together.
Consistency Across Pages
Visitors should always know which site they are on and how to get anywhere else. So every page shares the same:
- header with the logo (linking to the home page),
- navigation bar with the same links in the same order,
- footer with contact details and credits.
Only the <main> content and the <title> change from page to page.
A Page Template
menu.html — built from the templateHTML
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Menu | Ceylon Leaf Tea Room, Galle</title></head><body> <header> <a href="index.html"><img src="images/logo.svg" alt="Ceylon Leaf Tea Room home" width="200"></a> <nav> <ul> <li><a href="index.html">Home</a></li> <li><a href="menu.html">Menu</a></li> <li><a href="gallery.html">Gallery</a></li> <li><a href="order.html">Order</a></li> <li><a href="about.html">About</a></li> </ul> </nav> </header> <main> <h1>Our Menu</h1> <p>All prices are in Sri Lankan rupees (LKR).</p> </main> <footer> <p>Ceylon Leaf Tea Room · 12 Church Street, Galle Fort · Open daily 9.00 am – 7.00 pm</p> <p><a href="about.html#credits">Photo credits</a></p> </footer></body></html>What the browser shows
A Safe Way to Build Five Pages
- Finish index.html first, with the complete header, navigation and footer.
- Test every link in the navigation bar.
- Save a copy as menu.html (File → Save As), change the title and replace only the <main> content.
- Repeat for gallery.html, order.html and about.html.
- If you later change the navigation, change it on every page.
Writing the About Page
Assignment briefs often ask for an About page with the business's history, vision, mission and values. These are business words, so learn what each one means before you write:
| Four parts of an About page | |||
|---|---|---|---|
The main content of about.htmlHTML
<main> <h1>About Us</h1> <h2>Our story</h2> <p>Our founder grew up on a tea estate near Nuwara Eliya. In 2016 she opened a small tea counter with four tables…</p> <h2>Our vision</h2> <p>To be the place every visitor to Galle remembers for a real cup of Ceylon tea.</p> <h2>Our mission</h2> <p>We brew single-estate teas bought directly from small growers and bake traditional sweets fresh every morning.</p> <h2>Our values</h2> <ul> <li><strong>Freshness</strong> — tea brewed to order and sweets baked each day.</li> <li><strong>Fairness</strong> — fair prices for growers, staff and guests.</li> <li><strong>Hospitality</strong> — every guest is welcomed like family.</li> </ul></main>What the browser shows
Checking the Site
Practice
Which element should be the SAME on every page of the site?
More lessons in HTML · Next: A Gallery Page · Previous: Submit and Reset Buttons — the Complete Order Form
