πΊοΈ 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:
- What is the site for? β A personal portfolio? A recipe collection? A small business? A hobby blog?
- Who is the audience? β Friends and family? Potential employers? Customers? Strangers who love cooking?
- 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.
(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
- List every page your site needs. Start with the obvious ones: Home, About, Contact. Then add content pages.
- Decide the hierarchy β which pages are top-level (in the main nav) and which are deeper?
- 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:
| 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.
π‘ 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:
- Hero section β welcome heading, one-sentence tagline, call-to-action button
- Feature cards β 3 cards linking to About, Recipes, Contact
- Featured recipe β preview of one recipe with image and link
- Footer β copyright, links, social icons
About Page Content Outline:
- Introduction β photo, name, short bio
- Story β how you got into cooking (or your topic)
- Interests β hobbies, favorites, fun facts
- Why this site β what visitors will find here
Recipe Page Content Outline:
- Recipe title and image
- Prep info β time, servings, difficulty
- Ingredients list
- Step-by-step instructions
- Tips/notes
Contact Page Content Outline:
- Introduction β friendly invitation to reach out
- Contact form β name, email, message, submit button
- 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:
- Primary color β your brand color, used for headers, buttons, links. (e.g., a blue, green, or teal)
- Accent color β for highlights, hover states, call-to-action buttons. Should contrast with the primary.
- Background β usually white or very light gray for light mode
- Text β dark gray or near-black (pure black is actually harder to read than dark gray)
- 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 contentimages/folder β all images in one place with descriptive namesjs/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, notMy Websiteormy_website) - Never use spaces in filenames β they cause problems in URLs
- Be descriptive:
hero-sunset.jpgis better thanIMG_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:
- What is my site about? (1β2 sentences)
- Who is my audience? (1 sentence)
- 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
- Pick a primary color, an accent color, and a text color. Use a tool like Coolors or Happy Hues.
- Decide on one or two font families. Google Fonts or the system font stack.
- Check your text/background contrast at WebAIM Contrast Checker.
Step 6: Set Up Your Project
- Create the folder structure shown above
- Create a
css/style.cssfile with your:rootcustom properties (colors, fonts, spacing) - Add the
box-sizingreset andbodybase styles - 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.