1Bringing It All Together: Building a Complete Website
▶
Building a complete website from scratch is the moment when every individual skill you have learned — writing semantic HTML, embedding images, creating links, and organizing files — converges into a single, coherent project. Rather than practicing isolated techniques, you now apply them together, making decisions that affect the entire site rather than just one element on one page. This end-to-end process mirrors real-world web development work, where thoughtful planning, consistent structure, and careful testing are just as important as knowing the syntax of any particular tag. The sections below walk through every stage of constructing a functional multi-page website, from the first sketch on paper to the final validation check in a browser.
Planning Your Multi-Page Website Structure
Every successful website begins not with code but with a plan. Before you create a single file, you need to answer a fundamental question: what pages does this site actually need? For most beginner projects — and many professional ones — the answer centers on a small set of core pages. A Home page (index.html) serves as the entry point and gives visitors an immediate sense of what the site is about. An About page (about.html) provides background information, whether about a person, a business, or an organization. A Contact page (contact.html) gives visitors a way to reach out, typically with an email address, a phone number, or a form.
Depending on the site's purpose, you might also need additional pages — a portfolio gallery, a services listing, a blog index — but starting with these three gives you a manageable scope while covering all the structural patterns you need to practice. The key discipline at this stage is resisting the urge to invent pages you do not need yet. A focused three-page site built well is far more valuable than a sprawling ten-page site built inconsistently.
Once you know which pages you need, sketch a site map. A site map is a simple diagram — even a hand-drawn one — showing each page as a labeled box and drawing arrows between boxes to represent links. For a three-page site the map might look like this conceptually: the Home page links to About and Contact; About links back to Home and to Contact; Contact links back to Home and About. Every page links to every other page through the navigation menu. This diagram is not decoration — it is a blueprint that tells you exactly which <a> elements you will need to write and prevents you from forgetting a connection.
The planning stage is also the right moment to inventory your media assets. List every image you intend to use: a logo, a hero photograph, a profile portrait, icons, and so on. Collect or create those files before you begin coding. Trying to write an <img> tag pointing to a file that does not exist yet, or hunting for images midway through coding, interrupts your workflow and leads to broken paths. Gather everything first, name the files clearly, and place them in your project's image folder so they are ready when you need them.
Setting Up a Consistent File and Folder Organization
A well-organized folder structure is not about tidiness for its own sake — it directly determines whether your links and image paths will work correctly. The standard approach for a small multi-page site places all HTML files at the root level of the project folder, meaning they sit directly inside the main project directory rather than inside any subfolder. This makes internal links between pages simple and predictable. To link from index.html to about.html, you write href="about.html" with no folder prefix needed because both files live in the same directory.
A recommended folder layout for a three-page project looks like this:
my-website/
├── index.html
├── about.html
├── contact.html
└── images/
├── logo.png
├── hero-photo.jpg
└── profile-portrait.jpg
All image files go inside a dedicated images/ subfolder. This separation keeps the root directory from becoming cluttered as the project grows and makes image paths consistent: every <img> tag on every page will use a path that begins with images/ followed by the filename. If you later add a CSS stylesheet, you would create a css/ folder on the same level as images/ and follow the same pattern.
One subtle but important rule is to use lowercase, hyphenated filenames throughout — for HTML files, image files, and folder names alike. Write about.html, not About.html. Write hero-photo.jpg, not HeroPhoto.jpg. The reason is operating-system case sensitivity. On Windows, the file system treats About.html and about.html as the same file, so a casing error may go unnoticed during development. On Linux-based web servers — which host the vast majority of websites — those two filenames are completely different, and a link using the wrong casing produces a 404 error the moment the site is uploaded. Adopting lowercase-and-hyphen naming from the very beginning eliminates this entire category of bug.
Applying Semantic Markup Across Every Page
Semantic HTML means choosing elements based on the meaning and role of the content they contain, not merely how those elements look by default in a browser. When you use semantic elements consistently across every page, you create a site that is understandable to browsers, search engines, assistive technologies like screen readers, and other developers who might read your code.
The core semantic structure for a web page uses five elements working together: <header>, <nav>, <main>, <footer>, and <section>. A typical page skeleton looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home – My Website</title>
</head>
<body>
<header>
<img src="images/logo.png" alt="My Website logo">
<h1>My Website</h1>
</header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
<main>
<section>
<h2>Welcome</h2>
<p>This is the home page of my website.</p>
</section>
</main>
<footer>
<p>© 2024 My Website</p>
</footer>
</body>
</html>
The <header> element wraps introductory content that appears at the top of the page — typically the site logo and name. The <nav> element marks up the primary navigation links. Screen readers announce the presence of a <nav> element so that keyboard users can jump directly to it or skip past it. The <main> element contains the content that is unique to the current page — it should appear only once per page and should not include repeated elements like the header or footer. The <footer> holds closing information such as copyright notices or secondary links. The <section> element groups related content within <main> when the page has multiple distinct areas.
Applying this same skeleton across index.html, about.html, and contact.html creates a coherent, consistent site. Only the content inside <main> changes from page to page; the header, nav, and footer remain structurally identical. This consistency makes the site easier to maintain and easier for users to understand.
Embedding Images with Descriptive Alt Text
Images are embedded using the <img> element, which is a void element — it has no closing tag. Its two required attributes are src and alt. The src attribute provides the path to the image file, and the alt attribute provides a text description of the image.
Because all image files live in the images/ subfolder, every src path on every page begins with images/ followed by the filename:
<img src="images/hero-photo.jpg" alt="A panoramic view of the city skyline at dusk">
Writing good alt text is both a usability requirement and an accessibility obligation. The alt text is read aloud by screen readers for users who cannot see the image, and it appears as visible text in the browser if the image fails to load. Good alt text describes the content and purpose of the image in the context of the page. A profile photograph on an About page might use alt="María García, founder of Bright Ideas Studio". A decorative background texture that carries no informational meaning should use an empty alt attribute — alt="" — so that screen readers skip it entirely rather than announcing a useless description.
What to avoid in alt text:
- Using the filename:
alt="hero-photo.jpg"tells a screen reader user nothing. - Using generic labels:
alt="image"oralt="photo"are equally meaningless. - Beginning with "Image of" or "Picture of" — screen readers already announce that an image is present, so this phrasing is redundant.
You should also control image dimensions to prevent layout shift — the jarring reflow that happens when a browser renders the page before knowing how large an image is, then jumps the layout when the image finally loads. The most reliable approach is to add width and height attributes directly on the <img> tag using the image's actual pixel dimensions. The browser reserves the correct amount of space immediately, even before the image downloads:
<img src="images/profile-portrait.jpg"
alt="María García, founder of Bright Ideas Studio"
width="300"
height="300">
Creating Internal Links Between Pages
Internal links connect pages within your own site. Because all your HTML files sit at the same root level, linking between them uses simple relative paths — just the filename, with no domain name or folder prefix needed:
<a href="about.html">About</a>
<a href="contact.html">Contact</a>
<a href="index.html">Home</a>
These links work correctly as long as the file they point to exists at the expected location in the project folder. This is why file organization and consistent naming matter so much — a misplaced file or a casing error in the filename produces a broken link.
Your navigation menu must appear on every page in exactly the same form. A visitor who lands directly on your Contact page from a search engine result must have the same navigation available to them as a visitor who started on the Home page. Inconsistent navigation — present on some pages but absent on others — disorients users and damages the site's usability.
One important enhancement is highlighting the active page link so users always know where they are. The simplest HTML-only technique is to add a descriptive attribute to the link for the current page. In modern HTML you would use aria-current="page", which communicates the active page both to screen readers and to CSS rules:
<!-- On index.html -->
<nav>
<ul>
<li><a href="index.html" aria-current="page">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
The aria-current="page" attribute on the Home link tells assistive technologies that this is the link for the currently displayed page. You would move this attribute to whichever link matches the page the visitor is currently viewing — it appears on the Home link only in index.html, on the About link only in about.html, and so on. Even without CSS styling, this attribute provides a meaningful signal to screen reader users.
Adding External Links and Best Practices
External links point to pages on other websites. Unlike internal links, external links require the complete, absolute URL as the href value — the full address including the protocol (https://), the domain name, and any path:
<a href="https://www.example.com">Visit Example</a>
A very common convention for external links is opening them in a new browser tab using the target="_blank" attribute. The rationale is that when a user clicks an external link and it opens in the same tab, they navigate away from your site entirely. Opening in a new tab lets them explore the external resource while keeping your site open and accessible:
<a href="https://www.example.com" target="_blank">Visit Example</a>
However, target="_blank" alone introduces a security vulnerability. By default, a page opened in a new tab via target="_blank" can access the window.opener JavaScript object of the original page, potentially allowing a malicious external site to redirect your page to a phishing URL. To prevent this, always pair target="_blank" with rel="noopener noreferrer":
<a href="https://www.example.com"
target="_blank"
rel="noopener noreferrer">Visit Example</a>
The two values in the rel attribute serve slightly different purposes:
noopener— prevents the new tab from having access towindow.opener, blocking the security risk.noreferrer— prevents the browser from sending the HTTPRefererheader to the destination site, adding a layer of privacy. It also impliesnoopenerbehavior in most browsers, but including both is the clearest and most compatible approach.
This combination — target="_blank" rel="noopener noreferrer" — has become the standard, expected pattern for external links across the entire web development industry. Make it a habit to write all three attributes together whenever you create an external link.
Reviewing and Testing Your Complete Website
Writing code is only part of building a website. Thorough testing is what separates a site that looks finished from a site that actually works. Testing a multi-page site involves several distinct checks, each targeting a different type of potential problem.
Begin with link testing. Open every HTML file in your browser. On each page, click every link in the navigation menu and verify that it loads the correct destination page. Then check that any additional in-page links — to external resources, to sections within the same page using anchor fragments, or to downloadable files — all resolve correctly. A single click is not enough; navigate through every possible path a user might take. A link that appears broken only when coming from a specific page is a real bug even if it works from other pages.
Next, perform an image audit. Review every page for broken image icons — the small placeholder that browsers display when an image file cannot be found. Broken images are usually caused by a typo in the src path, a misplaced file, or a filename casing error. Fix each broken image by confirming the file exists in the images/ folder and that the path in the src attribute matches the actual filename exactly, including its extension (.jpg, .png, .gif, etc.). While reviewing images, also check that every <img> element has an alt attribute and that the alt text accurately and usefully describes the image.
After link and image testing, run your HTML through a validator. The W3C Markup Validation Service (validator.w3.org) is the industry-standard tool for this purpose. You can paste your HTML directly, upload the file, or (for deployed sites) provide a URL. The validator checks your markup against the HTML specification and reports errors — such as unclosed tags, missing required attributes, or elements nested in ways the specification does not permit — and warnings, which are less severe issues worth knowing about. Validating every page catches structural problems that browsers often silently compensate for, which means those problems may appear as rendering defects in less forgiving browsers or on future browser versions.
Finally, conduct a responsive review. Open each page on a desktop browser at full width and inspect whether the layout looks as intended. Then resize the browser window to a narrow width simulating a mobile phone screen. You can also use your browser's built-in developer tools — available in Chrome, Firefox, Edge, and Safari by pressing F12 or right-clicking and selecting "Inspect" — to preview the page at specific device dimensions. Check that text remains readable, that images do not overflow their containers, that the navigation menu is accessible, and that no content is cut off or hidden unintentionally. Ensuring your site works at multiple screen sizes is not optional in a world where more than half of all web traffic comes from mobile devices.
The following table summarizes the complete testing checklist for a multi-page website:
| Test Category | What to Check | Common Causes of Failure |
|---|---|---|
| Internal link testing | Every nav link on every page leads to the correct destination | Wrong filename, incorrect relative path, file moved or renamed |
| External link testing | External links open the correct URL, in a new tab if applicable | Typo in URL, missing https://, missing rel attributes |
| Image loading | All images display without broken-image placeholders | Incorrect src path, filename casing mismatch, missing file |
| Alt text accuracy | Every <img> has a meaningful alt attribute |
Missing attribute, generic text like "image", or filename used as alt |
| HTML validation | No errors reported by the W3C Markup Validation Service | Unclosed tags, invalid nesting, missing required attributes |
| Responsive layout | Content is readable and usable at desktop and mobile widths | Fixed pixel widths on images, text too small, navigation inaccessible |
Working through this checklist methodically — rather than assuming the site works because it looked fine during the last coding session — is the professional approach to web development. Bugs found during your own testing cost minutes to fix; bugs found by users after launch damage trust and credibility. Completing each stage of this process, from initial planning through final validation, gives you a multi-page website that is structurally sound, accessible, secure, and ready to build upon as your skills continue to grow.