Skip to main content

πŸ—ΊοΈ Lesson 16: Planning Your Site

The biggest mistake beginners make isn't a CSS typo or a missing closing tag β€” it's jumping straight into code without a plan. Professional web developers spend significant time planning before they write a single line of HTML. A clear plan saves hours of rework, prevents "blank page paralysis," and produces a better result. In this lesson, you'll plan the multi-page website you'll build in the next three lessons.

🎯 Learning Objectives

By the end of this lesson, you will be able to:

  • Define your site's purpose, audience, and goals
  • Create a sitemap showing all pages and how they connect
  • Sketch wireframes for desktop and mobile layouts
  • Plan your content before writing code
  • Choose a color palette and typography system
  • Set up your project folder structure
  • Create a style guide with CSS custom properties

Estimated Time: 45 minutes

Hands-on: You'll produce a complete plan for your website β€” sitemap, wireframes, content outline, and style guide.

πŸ“‘ In This Lesson

Why Planning Matters

Imagine building a house by laying bricks first and deciding where the rooms go later. Absurd, right? Yet that's what many beginner developers do β€” they open an editor, start typing HTML, and figure it out as they go. The result is usually a tangled mess that needs to be rewritten.

Planning before coding gives you:

  • Direction β€” you know what you're building before you start
  • Consistency β€” colors, fonts, and spacing are decided once and applied everywhere
  • Speed β€” no staring at a blank page wondering what to do next
  • Quality β€” problems are easier to spot in a sketch than in code

The plan doesn't need to be fancy. A napkin sketch, a text outline, and a few color choices is enough. What matters is having something before you code.

Define Your Purpose & Audience

Before designing anything, answer three questions:

  1. What is the site for? β€” A personal portfolio? A recipe collection? A small business? A hobby blog?
  2. Who is the audience? β€” Friends and family? Potential employers? Customers? Strangers who love cooking?
  3. What should visitors do? β€” Read your story? Contact you? Browse recipes? View your work?

Write your answers down in one or two sentences each. This becomes your project brief β€” a north star for every decision you'll make.

πŸ’‘ Example Project Brief

Purpose: A personal website to share my recipes and a little about myself.

Audience: Friends, family, and anyone who finds my recipes through search.

Goal: Visitors should be able to browse recipes easily and contact me if they want.

This example is what we'll use for the course project. If you have a different idea for your site β€” a portfolio, a fan page, a small business β€” adapt the exercises to fit. The skills are the same regardless of the topic.

Creating a Sitemap

A sitemap is a diagram showing every page on your site and how they link to each other. It's the blueprint for your navigation.

graph TD A["Home
(index.html)"] --> B["About
(about.html)"] A --> C["Recipes
(recipe.html)"] A --> D["Contact
(contact.html)"] style A fill:#eff6ff,stroke:#3b82f6,stroke-width:2px,color:#1e293b style B fill:#f0fdf4,stroke:#22c55e,stroke-width:2px,color:#1e293b style C fill:#f0fdf4,stroke:#22c55e,stroke-width:2px,color:#1e293b style D fill:#f0fdf4,stroke:#22c55e,stroke-width:2px,color:#1e293b

For our course project, the sitemap is simple: four pages all linked from the homepage. Every page has the same navigation bar, so visitors can reach any page from any other page.

How to Create a Sitemap

  1. List every page your site needs. Start with the obvious ones: Home, About, Contact. Then add content pages.
  2. Decide the hierarchy β€” which pages are top-level (in the main nav) and which are deeper?
  3. Draw the connections β€” how does a visitor get from one page to another?

Keep it small. A four to six page site is perfect for a first project. You can always add pages later.

Page Inventory

For each page, write a one-line description of its purpose:

Course Project β€” Page Inventory
Page File Purpose
Home index.html Welcome message, featured content, quick links to other pages
About about.html Personal story, photo, interests, what the site is about
Recipes recipe.html Collection of recipes with ingredients and instructions
Contact contact.html Contact form, social media links, email address

Sketching Wireframes

A wireframe is a simple sketch showing where elements go on a page β€” without colors, images, or final content. Think of it as a floor plan for your layout.

Wireframes don't need to be pretty. Boxes and labels on paper or a whiteboard are perfect. The goal is to answer: "Where does everything go?"

What to Include in a Wireframe

  • Navigation bar position and contents
  • Header/hero area
  • Main content sections
  • Sidebar (if any)
  • Footer
  • Key UI elements: buttons, forms, card grids, images

Desktop vs. Mobile Wireframes

Sketch at least two versions: desktop (wide) and mobile (narrow). The mobile wireframe should show how the layout collapses β€” sidebar stacks below main content, nav becomes a hamburger menu, card grids go to single column.

graph TD subgraph "Desktop Wireframe" DH["[ Navigation Bar ]"] DHero["[ Hero / Welcome Section ]"] DCards["[ Card Row: 3 across ]"] DFooter["[ Footer ]"] end DH --> DHero --> DCards --> DFooter style DH fill:#eff6ff,stroke:#3b82f6,stroke-width:2px,color:#1e293b style DHero fill:#eff6ff,stroke:#3b82f6,stroke-width:2px,color:#1e293b style DCards fill:#eff6ff,stroke:#3b82f6,stroke-width:2px,color:#1e293b style DFooter fill:#eff6ff,stroke:#3b82f6,stroke-width:2px,color:#1e293b
graph TD subgraph "Mobile Wireframe" MH["[ ☰ Nav ]"] MHero["[ Hero ]"] MC1["[ Card 1 ]"] MC2["[ Card 2 ]"] MC3["[ Card 3 ]"] MFooter["[ Footer ]"] end MH --> MHero --> MC1 --> MC2 --> MC3 --> MFooter style MH fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1e293b style MHero fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1e293b style MC1 fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1e293b style MC2 fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1e293b style MC3 fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1e293b style MFooter fill:#fef2f2,stroke:#ef4444,stroke-width:2px,color:#1e293b

πŸ’‘ Tools for Wireframing

You don't need fancy software. These all work:

  • Paper and pencil β€” the fastest option. Draw boxes.
  • Excalidraw (excalidraw.com) β€” free, browser-based, looks hand-drawn
  • Figma (figma.com) β€” free tier, industry-standard design tool
  • Whiteboard β€” great for brainstorming with others

For this course, a quick paper sketch is all you need.

Content-First Planning

"Content first" means deciding what you'll say before deciding how it looks. Too many beginners design beautiful layouts and then realize they have nothing to put in them β€” or worse, they stretch thin content across a layout designed for more.

Write a Content Outline

For each page, list the sections and what goes in them. You don't need final text β€” just a roadmap:

Home Page Content Outline:

  1. Hero section β€” welcome heading, one-sentence tagline, call-to-action button
  2. Feature cards β€” 3 cards linking to About, Recipes, Contact
  3. Featured recipe β€” preview of one recipe with image and link
  4. Footer β€” copyright, links, social icons

About Page Content Outline:

  1. Introduction β€” photo, name, short bio
  2. Story β€” how you got into cooking (or your topic)
  3. Interests β€” hobbies, favorites, fun facts
  4. Why this site β€” what visitors will find here

Recipe Page Content Outline:

  1. Recipe title and image
  2. Prep info β€” time, servings, difficulty
  3. Ingredients list
  4. Step-by-step instructions
  5. Tips/notes

Contact Page Content Outline:

  1. Introduction β€” friendly invitation to reach out
  2. Contact form β€” name, email, message, submit button
  3. Alternative contact β€” email address, social media links

πŸ’‘ Where to Get Placeholder Content

If you don't have real content ready, use realistic placeholders:

  • Text: Write your own rough draft β€” even a few sentences per section. Avoid "Lorem ipsum" for key areas because it hides layout problems.
  • Images: Use Unsplash (free, high-quality photos) or Lorem Picsum (random placeholder images at any size)

Choosing a Color Palette

A consistent color palette makes your site look intentional and professional. You don't need many colors β€” most well-designed sites use 3 to 5 colors:

  1. Primary color β€” your brand color, used for headers, buttons, links. (e.g., a blue, green, or teal)
  2. Accent color β€” for highlights, hover states, call-to-action buttons. Should contrast with the primary.
  3. Background β€” usually white or very light gray for light mode
  4. Text β€” dark gray or near-black (pure black is actually harder to read than dark gray)
  5. Border/muted β€” light gray for borders, dividers, subtle backgrounds

Color Palette Tools

  • Coolors β€” generates harmonious palettes with one click
  • Adobe Color β€” advanced color wheel with harmony rules
  • Happy Hues β€” shows complete palettes applied to a real page layout
  • Realtime Colors β€” preview your palette on a live website template

Example Palette

:root {
    /* Primary */
    --color-primary: #1e40af;       /* deep blue */
    --color-primary-light: #3b82f6; /* lighter blue for hovers */

    /* Accent */
    --color-accent: #f59e0b;        /* warm amber */

    /* Backgrounds */
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;        /* light gray for alternating sections */

    /* Text */
    --color-text: #1e293b;          /* dark slate */
    --color-text-light: #64748b;    /* muted text for captions, dates */

    /* Borders */
    --color-border: #e2e8f0;

    /* Feedback */
    --color-success: #16a34a;
    --color-error: #dc2626;
}

πŸ’‘ Accessibility: Check Your Contrast

Text must have enough contrast against its background to be readable. The WCAG standard requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. Use WebAIM's Contrast Checker to verify your color pairs. Dark text on a light background almost always passes; light text on a colored background often fails.

Choosing Typography

Typography is one of the biggest factors in how "professional" a site looks. The good news: you only need one or two font families.

Font Pairing Strategy

  • One font for everything β€” the simplest approach. Pick a versatile sans-serif like Inter, Open Sans, or system fonts. Use different weights (regular, semibold, bold) to create hierarchy.
  • Two fonts β€” one for headings (can be a serif or decorative sans-serif) and one for body text (a readable sans-serif). Example: Playfair Display for headings + Inter for body.

Loading Web Fonts (Google Fonts)

<!-- In your <head> β€” loads Inter from Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
      rel="stylesheet">
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, sans-serif;
}

The System Font Stack (Zero Load Time)

If you don't want to load external fonts, the system font stack uses each device's native font β€” it's free, fast, and looks native:

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Oxygen, Ubuntu, Cantarell,
                 "Helvetica Neue", sans-serif;
}

Type Scale

Define your font sizes as a consistent scale. A common approach is a major third scale (1.25x ratio):

:root {
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
body { font-size: var(--font-size-base); line-height: 1.6; }

Building a Style Guide with Custom Properties

A style guide is a single source of truth for your site's visual decisions. In CSS, custom properties (variables) make this practical β€” define values once in :root and reference them everywhere.

:root {
    /* ===========================
       Colors
       =========================== */
    --color-primary: #1e40af;
    --color-primary-light: #3b82f6;
    --color-accent: #f59e0b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-border: #e2e8f0;
    --color-success: #16a34a;
    --color-error: #dc2626;

    /* ===========================
       Typography
       =========================== */
    --font-family: "Inter", -apple-system, BlinkMacSystemFont,
                   "Segoe UI", Roboto, sans-serif;
    --font-size-base: 1rem;
    --line-height: 1.6;

    /* ===========================
       Spacing
       =========================== */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* ===========================
       Layout
       =========================== */
    --max-width: 1200px;
    --sidebar-width: 250px;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;

    /* ===========================
       Transitions
       =========================== */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

Now instead of remembering #1e40af, you write var(--color-primary). If you ever want to change the primary color, you change it in one place and it updates everywhere.

Dark Mode with Custom Properties

Custom properties make dark mode straightforward β€” just redefine the color variables:

/* Dark mode overrides */
[data-theme="dark"] {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #e2e8f0;
    --color-text-light: #94a3b8;
    --color-border: #334155;
    --color-primary: #60a5fa;
    --color-primary-light: #93c5fd;
}

Because all your styles reference the variables, switching to dark mode means switching the variable values β€” the rest of your CSS doesn't change at all.

Project Folder Structure

A clean folder structure keeps your project organized as it grows:

my-website/
β”œβ”€β”€ css/
β”‚   └── style.css          ← all your styles
β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ hero.jpg           ← hero/banner images
β”‚   β”œβ”€β”€ about-photo.jpg    ← your photo for the About page
β”‚   └── recipe-pasta.jpg   ← recipe images
β”œβ”€β”€ js/
β”‚   └── script.js          ← mobile menu toggle, interactivity
β”œβ”€β”€ index.html             ← Home page
β”œβ”€β”€ about.html             ← About page
β”œβ”€β”€ recipe.html            ← Recipes page
└── contact.html           ← Contact page

Why This Structure?

  • HTML files in the root β€” so links between pages are simple (href="about.html")
  • css/ folder β€” keeps styles separate from content
  • images/ folder β€” all images in one place with descriptive names
  • js/ folder β€” JavaScript files (even if you only have one)

πŸ’‘ Naming Conventions

  • Use lowercase for all file and folder names
  • Use hyphens to separate words (my-website, not My Website or my_website)
  • Never use spaces in filenames β€” they cause problems in URLs
  • Be descriptive: hero-sunset.jpg is better than IMG_4521.jpg

Hands-on Exercise

πŸ‹οΈ Exercise: Plan Your Website

Objective: Produce a complete plan for the website you'll build in the next three lessons.

Step 1: Write Your Project Brief

In a text file or on paper, answer:

  1. What is my site about? (1–2 sentences)
  2. Who is my audience? (1 sentence)
  3. What should visitors do? (1 sentence)

Step 2: Create Your Sitemap

List your pages (4 minimum) and draw how they connect. Use the Mermaid diagram in this lesson as a template, or sketch on paper.

Step 3: Sketch Wireframes

For your homepage, sketch a desktop layout and a mobile layout. Include: nav bar, hero section, card row, footer. Keep it simple β€” boxes and labels only.

Step 4: Write Content Outlines

For each page, list 3–5 sections with a one-line description of what goes in each section.

Step 5: Choose Your Colors & Fonts

  1. Pick a primary color, an accent color, and a text color. Use a tool like Coolors or Happy Hues.
  2. Decide on one or two font families. Google Fonts or the system font stack.
  3. Check your text/background contrast at WebAIM Contrast Checker.

Step 6: Set Up Your Project

  1. Create the folder structure shown above
  2. Create a css/style.css file with your :root custom properties (colors, fonts, spacing)
  3. Add the box-sizing reset and body base styles
  4. Create empty HTML files for each page (just the boilerplate with ! + Tab)
πŸ’‘ Hint

Don't overthink the planning. A few bullet points per page and a rough sketch is enough. The goal is to have direction before you code, not to create a perfect design document. Professional developers refine as they build β€” the plan just keeps you from wandering aimlessly.

βœ… Example Solution
/* css/style.css β€” starter file with style guide */

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-primary: #1e40af;
    --color-primary-light: #3b82f6;
    --color-accent: #f59e0b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-border: #e2e8f0;
    --color-success: #16a34a;
    --color-error: #dc2626;

    /* Typography */
    --font-family: "Inter", -apple-system, BlinkMacSystemFont,
                   "Segoe UI", Roboto, sans-serif;

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Layout */
    --max-width: 1000px;
    --border-radius: 8px;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--color-primary-light);
}
<!-- index.html β€” starter boilerplate -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Website - Home</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <!-- Navigation (same on every page) -->
    <nav></nav>

    <!-- Hero section -->
    <header></header>

    <!-- Main content -->
    <main></main>

    <!-- Footer (same on every page) -->
    <footer></footer>

    <script src="js/script.js"></script>
</body>
</html>

🎯 Quick Quiz

Question 1: Why should you plan before coding?

Question 2: What is a sitemap?

Question 3: What's the purpose of CSS custom properties in a style guide?

Question 4: What is the minimum contrast ratio for normal text (WCAG)?

Question 5: What's wrong with using spaces in filenames?

Summary

πŸŽ‰ Key Takeaways

  • Plan before you code β€” even a rough sketch and a few notes saves hours of rework
  • Start with a project brief: purpose, audience, and what visitors should do
  • Create a sitemap listing every page and how they connect
  • Sketch wireframes for desktop and mobile β€” boxes and labels, nothing fancy
  • Content first β€” decide what you'll say before deciding how it looks
  • Choose a color palette (3–5 colors) and check contrast for accessibility (4.5:1 minimum)
  • Pick one or two fonts β€” a system font stack is a great zero-cost option
  • Build a style guide with CSS custom properties β€” define values once, use everywhere
  • Keep your folder structure clean: HTML in root, CSS/JS/images in their own folders
  • Use lowercase filenames with hyphens β€” no spaces, no uppercase

πŸ“ Your Project So Far

my-website/
β”œβ”€β”€ css/
β”‚   └── style.css      ← style guide with custom properties + resets
β”œβ”€β”€ images/            ← placeholder images ready
β”œβ”€β”€ js/
β”‚   └── script.js      ← empty, ready for interactivity
β”œβ”€β”€ index.html         ← boilerplate ready
β”œβ”€β”€ about.html         ← boilerplate ready
β”œβ”€β”€ recipe.html        ← boilerplate ready
└── contact.html       ← boilerplate ready

Planning artifacts (paper, text file, or digital):
βœ… Project brief
βœ… Sitemap
βœ… Wireframes (desktop + mobile)
βœ… Content outlines for each page
βœ… Color palette + typography choices

πŸš€ What's Next?

Plan in hand, it's time to build. In the next lesson β€” Lesson 17: Building the Homepage β€” you'll turn your wireframe into real HTML and CSS. You'll build the navigation bar, hero section, feature cards, and footer that will set the pattern for every other page on your site.