Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Capstone Project – Build a C | CSS Basics to Advanced lesson | BraveProgrammer
  1. Courses
  2. /
  3. CSS Basics to Advanced

Lesson 50 of 50

·css

Capstone Project – Build a Complete Responsive Site

30 mins

Course progress100%

What you'll learn

Keep these ideas in mind as you work through the lesson.

3 points
  • Combine all learned concepts into a **real‑world, production‑ready** site.
  • Validate HTML + CSS, run performance & accessibility audits.
  • Document the design system (variables, naming conventions) used.

Goal

Create a real‑world three‑page website that showcases every major technique you’ve learned:

  • Layout – Grid for the page skeleton, Flexbox for component internals.
  • Responsive images – srcset, sizes, loading="lazy".
  • Dark‑mode – System preference + manual toggle using CSS variables.
  • Accessibility – Focus‑visible, ARIA landmarks, high‑contrast compliance.
  • Performance – Critical‑CSS inlining, preload, contain, and image optimisation.
  • SEO – Meta tags, Open Graph, JSON‑LD article markup.
  • Testing – Lint, visual regression (Backstop/Percy), Lighthouse audit.

Project Structure (recommended)

my-site/
├─ index.html          (Home)
├─ blog.html          (Blog listing)
├─ post.html          (Single article)
├─ css/
│  ├─ base.css          (reset, typography)
│  ├─ layout.css        (grid, utilities)
│  ├─ components.css    (buttons, cards, nav)
│  └─ theme.css         (variables, dark‑mode)
├─ img/                (optimized JPEG/AVIF/WebP)
├─ js/
│  └─ theme-toggle.js   (dark‑mode toggle)
└─ tests/               (Backstop config, stylelint)

Feature Checklist

FeatureImplementation Detail
Header<header> with logo, nav (grid + flex). Sticky on scroll (position:sticky).
HeroFull‑height section (height:100vh) with background image, gradient overlay, centered call‑to‑action (Flex).
Content GridBlog cards using grid-template-columns: repeat(auto-fill, minmax(260px,1fr)). Each card uses Flex for image + text alignment.
Responsive Images<picture> with source type="image/avif", fallback srcset for WebP & JPEG. loading="lazy".
Dark ModeCSS variables defined on :root; @media (prefers-color-scheme:dark) fallback; manual toggle via data-theme attribute.
Accessibility<nav aria-label="Main navigation">; button with :focus-visible; skip‑link at top; role="region" for each major section; all colour pairs meet AA contrast.
PerformanceInline critical CSS (hero styles, font‑face); <link rel="preload" href="/css/layout.css" as="style" onload="this.rel='stylesheet'">; contain on heavy sections (.gallery { contain:layout style; }).
SEO<meta name="description">; Open Graph (og:title, og:image); JSON‑LD schema for Article.
TestingRun npm run lint:css, npm run backstop:test, npm run lighthouse. Document results in README.md.

Deliverables

  • ZIP containing the full folder structure.
  • README describing how to run the build, tests, and a short reflection on the design decisions.
  • Lighthouse report (saved as HTML) showing at least 90 in Performance, Accessibility, Best Practices, and SEO.

Pro Tips for a Polished Submission

  1. Compress images with cwebp/avif and include <source> elements for modern browsers.
  2. Use font-display:swap on web‑fonts to avoid FOIT.
  3. Add a “Back to top” button that appears after scrolling 300 px (position:fixed; bottom:2rem; right:2rem;).
  4. Use CSS Grid named areas so the layout code reads like a diagram.
  5. Provide a fallback stylesheet for browsers that lack Grid (@supports not (display:grid) { … }).

Evaluation Criteria

CategoryWhat the reviewer looks for
CorrectnessAll listed features are present and work across major browsers.
Code QualityClean, organized CSS (SCSS optional), BEM/ITCSS naming, no unused selectors.
AccessibilityFull keyboard navigation, focus rings, colour contrast, ARIA landmarks.
PerformanceCritical CSS inline, lazy‑loaded images, < 2 s First Contentful Paint on Lighthouse.
ResponsivenessLayout gracefully adapts from 320 px to 1920 px without horizontal scroll.
TestingLint passes, visual regression diff is clean, Lighthouse score ≥ 90.

Next Steps (after the capstone)

  • Publish the site to GitHub Pages or a Netlify/Vercel preview.
  • Add the project to your portfolio with a short case‑study.
  • Write a blog post about the challenges you faced and how you solved them (great for SEO!).

Closing Thought

By the end of this capstone you will have a production‑ready codebase that demonstrates modern CSS mastery – exactly what recruiters and clients look for.

Make it stickPractice what you've learned1 quiz · 6 practical tests · Optional activities from CSS Basics to AdvancedBrowse activities
Previous lessonCSS Testing – Visual Regression & LintingCourse completeBack to the curriculumBack to CSS Basics to Advanced curriculum