Build a complete responsive website applying all responsive design techniques learned throughout the course.
This capstone lesson brings together everything you've learned about responsive web design into one comprehensive project. You'll build a complete, professional website that demonstrates mastery of mobile-first design, flexible grids, responsive typography, optimized images, touch-friendly interfaces, and performance optimization.
This project will serve as a showcase piece for your portfolio, demonstrating your ability to create modern, accessible, and performant responsive websites that work beautifully across all devices and screen sizes.
The website you'll build includes a homepage, portfolio section, about page, and contact form - all implemented with cutting-edge responsive design techniques and best practices.
Before writing code, successful responsive projects require careful planning and architectural decisions.
Mobile-First Content Strategy:
Performance Budget Planning:
1Mobile Performance Targets:
2- First Contentful Paint: < 1.8s
3- Largest Contentful Paint: < 2.5s
4- Total Bundle Size: < 500KB
5- Image Optimization: WebP with fallbacks
6- Critical CSS: Inline above-fold stylesResponsive Breakpoint Strategy:
1/* Mobile-first breakpoint system */
2:root {
3 --breakpoint-sm: 480px; /* Small phones */
4 --breakpoint-md: 768px; /* Tablets */
5 --breakpoint-lg: 1024px; /* Laptops */
6 --breakpoint-xl: 1400px; /* Large screens */
7}Component-Based Architecture:
Accessibility-First Approach:
Technology Stack:
Build the responsive website using a systematic, mobile-first approach.
Phase 1: Foundation & Structure
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <meta name="description" content="Professional web developer portfolio">
7 <title>Responsive Portfolio - John Doe</title>
8
9 <!-- Critical CSS inlined -->
10 <style>
11 /* Critical above-fold styles */
12 </style>
13
14 <!-- Preload important resources -->
15 <link rel="preload" href="fonts/primary.woff2" as="font" type="font/woff2" crossorigin>
16 <link rel="preconnect" href="https://fonts.googleapis.com">
17</head>
18<body>
19 <div class="site-container">
20 <header class="site-header">
21 <!-- Mobile-first navigation -->
22 </header>
23
24 <main class="site-main">
25 <!-- Main content sections -->
26 </main>
27
28 <footer class="site-footer">
29 <!-- Footer content -->
30 </footer>
31 </div>
32</body>
33</html>Phase 2: Responsive Grid Systems
1/* Flexible container system */
2.container {
3 width: 100%;
4 max-width: 1200px;
5 margin: 0 auto;
6 padding: 0 1rem;
7}
8
9/* Auto-responsive grid */
10.grid {
11 display: grid;
12 grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
13 gap: 2rem;
14}
15
16/* Portfolio grid with flexible sizing */
17.portfolio-grid {
18 display: grid;
19 grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
20 gap: 1.5rem;
21 margin: 3rem 0;
22}Phase 3: Responsive Typography System
1/* Fluid typography scale */
2:root {
3 --font-size-sm: clamp(0.875rem, 2vw, 1rem);
4 --font-size-base: clamp(1rem, 2.5vw, 1.125rem);
5 --font-size-lg: clamp(1.25rem, 3vw, 1.5rem);
6 --font-size-xl: clamp(1.75rem, 4vw, 2.25rem);
7 --font-size-2xl: clamp(2.5rem, 6vw, 3.5rem);
8
9 --line-height-tight: 1.2;
10 --line-height-normal: 1.6;
11 --line-height-relaxed: 1.8;
12}
13
14/* Responsive text scaling */
15.text-responsive {
16 font-size: var(--font-size-base);
17 line-height: var(--line-height-normal);
18}Phase 4: Interactive Elements & Animations
1/* Touch-friendly interactive elements */
2.button {
3 min-height: 44px;
4 min-width: 44px;
5 padding: 12px 24px;
6 border-radius: 8px;
7 transition: all 0.3s ease;
8 cursor: pointer;
9}
10
11.button:hover {
12 transform: translateY(-2px);
13 box-shadow: 0 8px 25px rgba(0,0,0,0.15);
14}
15
16/* Responsive animations */
17@media (prefers-reduced-motion: reduce) {
18 * {
19 animation-duration: 0.01ms !important;
20 animation-iteration-count: 1 !important;
21 transition-duration: 0.01ms !important;
22 }
23}Phase 5: Performance Optimization
1/* Critical CSS optimization */
2.above-fold {
3 /* Inline critical styles */
4}
5
6/* Non-critical CSS loaded asynchronously */
7@media screen and (min-width: 768px) {
8 /* Progressive enhancement styles */
9}
10
11/* Image optimization */
12.responsive-image {
13 width: 100%;
14 height: auto;
15 object-fit: cover;
16 loading: lazy;
17}This systematic approach ensures every aspect of responsive design is properly implemented while maintaining performance and accessibility standards.
Combine all course concepts into one cohesive, professional implementation.
Advanced Grid Layouts:
1/* Holy Grail responsive layout */
2.site-layout {
3 display: grid;
4 grid-template:
5 "header" auto
6 "main" 1fr
7 "footer" auto
8 / 1fr;
9 min-height: 100vh;
10}
11
12@media (min-width: 1024px) {
13 .site-layout {
14 grid-template:
15 "header header header" auto
16 "nav main aside" 1fr
17 "footer footer footer" auto
18 / 200px 1fr 200px;
19 }
20}
21
22/* Magazine-style responsive layout */
23.article-layout {
24 display: grid;
25 grid-template-columns:
26 minmax(1rem, 1fr)
27 minmax(0, 65ch)
28 minmax(1rem, 1fr);
29}
30
31.article-content {
32 grid-column: 2;
33}
34
35.full-width {
36 grid-column: 1 / -1;
37}Container Queries Integration:
1/* Component-based responsive design */
2.card-container {
3 container-type: inline-size;
4}
5
6.card {
7 padding: 1rem;
8 background: white;
9 border-radius: 8px;
10}
11
12@container (min-width: 300px) {
13 .card {
14 padding: 2rem;
15 display: flex;
16 gap: 1rem;
17 }
18}
19
20@container (min-width: 500px) {
21 .card {
22 padding: 3rem;
23 border-radius: 16px;
24 }
25}Advanced Image Optimization:
1<!-- Art direction with picture element -->
2<picture class="hero-image">
3 <source media="(min-width: 1024px)"
4 srcset="hero-desktop.webp"
5 type="image/webp">
6 <source media="(min-width: 768px)"
7 srcset="hero-tablet.webp"
8 type="image/webp">
9 <source media="(min-width: 480px)"
10 srcset="hero-mobile.webp"
11 type="image/webp">
12 <img src="hero-mobile.jpg"
13 alt="Professional workspace setup"
14 loading="eager"
15 decoding="async">
16</picture>Performance-Optimized Navigation:
1/* Mobile-first navigation with performance optimization */
2.mobile-nav {
3 position: fixed;
4 top: 0;
5 left: -100%;
6 width: 80%;
7 max-width: 300px;
8 height: 100vh;
9 background: white;
10 transition: transform 0.3s ease;
11 will-change: transform;
12 z-index: 1000;
13}
14
15.mobile-nav.active {
16 transform: translateX(100%);
17}
18
19/* Hardware-accelerated animations */
20.nav-item {
21 transform: translateZ(0);
22 backface-visibility: hidden;
23}Accessibility Integration:
1<!-- ARIA-enhanced navigation -->
2<nav class="main-nav" role="navigation" aria-label="Main navigation">
3 <button class="nav-toggle"
4 aria-expanded="false"
5 aria-controls="nav-menu"
6 aria-label="Toggle navigation menu">
7 <span class="nav-toggle-icon"></span>
8 </button>
9
10 <ul id="nav-menu" class="nav-menu" role="menubar">
11 <li role="none">
12 <a href="#home" role="menuitem" aria-current="page">Home</a>
13 </li>
14 <li role="none">
15 <a href="#portfolio" role="menuitem">Portfolio</a>
16 </li>
17 <li role="none">
18 <a href="#contact" role="menuitem">Contact</a>
19 </li>
20 </ul>
21</nav>This integration demonstrates mastery of all responsive design concepts covered in the course, creating a production-ready website that showcases professional-level skills.
A full-featured responsive website demonstrating all course concepts in a real-world implementation.
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <meta name="description" content="Professional web developer portfolio showcasing responsive design expertise">
7 <title>Responsive Portfolio - Alex Johnson</title>
8 <link rel="preconnect" href="https://fonts.googleapis.com">
9 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
11</head>
12<body>
13 <div class="site-container">
14 <!-- Progressive Enhancement Loading -->
15 <div class="loading-screen" id="loadingScreen">
16 <div class="loading-spinner"></div>
17 <p>Loading responsive experience...</p>
18 </div>
19
20 <!-- Responsive Header -->
21 <header class="site-header" role="banner">
22 <div class="container">
23 <div class="header-content">
24 <a href="#home" class="logo" aria-label="Alex Johnson - Web Developer">
25 <span class="logo-text">AJ</span>
26 </a>
27
28 <nav class="main-nav" role="navigation" aria-label="Main navigation">
29 <button class="nav-toggle"
30 aria-expanded="false"
31 aria-controls="nav-menu"
32 aria-label="Toggle navigation menu">
33 <span class="nav-toggle-icon"></span>
34 <span class="nav-toggle-text">Menu</span>
35 </button>
36
37 <ul id="nav-menu" class="nav-menu" role="menubar">
38 <li><a href="#home" class="nav-link active" role="menuitem">Home</a></li>
39 <li><a href="#about" class="nav-link" role="menuitem">About</a></li>
40 <li><a href="#portfolio" class="nav-link" role="menuitem">Portfolio</a></li>
41 <li><a href="#contact" class="nav-link" role="menuitem">Contact</a></li>
42 </ul>
43 </nav>
44 </div>
45 </div>
46 </header>
47
48 <!-- Main Content -->
49 <main class="site-main" role="main">
50 <!-- Hero Section -->
51 <section id="home" class="hero-section" aria-labelledby="hero-title">
52 <div class="container">
53 <div class="hero-content">
54 <div class="hero-text">
55 <h1 id="hero-title" class="hero-title">
56 Creating <span class="text-gradient">Responsive</span><br>
57 Digital Experiences
58 </h1>
59 <p class="hero-description">
60 I'm Alex Johnson, a web developer specializing in responsive design,
61 performance optimization, and accessible user experiences that work
62 beautifully across all devices.
63 </p>
64 <div class="hero-actions">
65 <a href="#portfolio" class="btn btn-primary">View Portfolio</a>
66 <a href="#contact" class="btn btn-secondary">Get In Touch</a>
67 </div>
68 </div>
69 <div class="hero-image">
70 <div class="image-placeholder">
71 <div class="placeholder-content">
72 📱💻🖥️
73 <p>Responsive Across All Devices</p>
74 </div>
75 </div>
76 </div>
77 </div>
78 </div>
79 </section>
80
81 <!-- About Section -->
82 <section id="about" class="about-section" aria-labelledby="about-title">
83 <div class="container">
84 <div class="section-header">
85 <h2 id="about-title" class="section-title">About Me</h2>
86 <p class="section-subtitle">Passionate about responsive web design and user experience</p>
87 </div>
88
89 <div class="about-content">
90 <div class="about-text">
91 <h3>Building Tomorrow's Web Today</h3>
92 <p>
93 With over 5 years of experience in web development, I specialize in creating
94 responsive websites that deliver exceptional user experiences across all devices.
95 My expertise includes mobile-first design, performance optimization, and
96 accessibility standards.
97 </p>
98 <div class="skills-grid">
99 <div class="skill-item">
100 <div class="skill-icon">🎨</div>
101 <h4>Responsive Design</h4>
102 <p>Mobile-first, flexible grids, fluid typography</p>
103 </div>
104 <div class="skill-item">
105 <div class="skill-icon">⚡</div>
106 <h4>Performance</h4>
107 <p>Optimization, lazy loading, critical CSS</p>
108 </div>
109 <div class="skill-item">
110 <div class="skill-icon">♿</div>
111 <h4>Accessibility</h4>
112 <p>WCAG compliance, screen readers, keyboard navigation</p>
113 </div>
114 <div class="skill-item">
115 <div class="skill-icon">📱</div>
116 <h4>Mobile UX</h4>
117 <p>Touch interfaces, progressive enhancement</p>
118 </div>
119 </div>
120 </div>
121 <div class="about-stats">
122 <div class="stat-item">
123 <div class="stat-number">150+</div>
124 <div class="stat-label">Responsive Sites</div>
125 </div>
126 <div class="stat-item">
127 <div class="stat-number">98%</div>
128 <div class="stat-label">Client Satisfaction</div>
129 </div>
130 <div class="stat-item">
131 <div class="stat-number">5+</div>
132 <div class="stat-label">Years Experience</div>
133 </div>
134 </div>
135 </div>
136 </div>
137 </section>
138
139 <!-- Portfolio Section -->
140 <section id="portfolio" class="portfolio-section" aria-labelledby="portfolio-title">
141 <div class="container">
142 <div class="section-header">
143 <h2 id="portfolio-title" class="section-title">Portfolio</h2>
144 <p class="section-subtitle">Recent projects showcasing responsive design excellence</p>
145 </div>
146
147 <div class="portfolio-filter">
148 <button class="filter-btn active" data-filter="all">All Projects</button>
149 <button class="filter-btn" data-filter="website">Websites</button>
150 <button class="filter-btn" data-filter="app">Web Apps</button>
151 <button class="filter-btn" data-filter="ecommerce">E-commerce</button>
152 </div>
153
154 <div class="portfolio-grid">
155 <article class="portfolio-item" data-category="website">
156 <div class="portfolio-image">
157 <div class="image-placeholder">🏢</div>
158 </div>
159 <div class="portfolio-content">
160 <h3>Corporate Website</h3>
161 <p>Responsive corporate site with advanced grid layouts and performance optimization.</p>
162 <div class="portfolio-tech">
163 <span class="tech-tag">Responsive Design</span>
164 <span class="tech-tag">CSS Grid</span>
165 <span class="tech-tag">Performance</span>
166 </div>
167 <div class="portfolio-actions">
168 <a href="#" class="btn btn-sm">View Project</a>
169 <a href="#" class="btn btn-sm btn-secondary">Live Demo</a>
170 </div>
171 </div>
172 </article>
173
174 <article class="portfolio-item" data-category="app">
175 <div class="portfolio-image">
176 <div class="image-placeholder">📱</div>
177 </div>
178 <div class="portfolio-content">
179 <h3>Task Management App</h3>
180 <p>Mobile-first web application with touch-optimized interface and offline support.</p>
181 <div class="portfolio-tech">
182 <span class="tech-tag">Mobile-First</span>
183 <span class="tech-tag">Touch UI</span>
184 <span class="tech-tag">PWA</span>
185 </div>
186 <div class="portfolio-actions">
187 <a href="#" class="btn btn-sm">View Project</a>
188 <a href="#" class="btn btn-sm btn-secondary">Live Demo</a>
189 </div>
190 </div>
191 </article>
192
193 <article class="portfolio-item" data-category="ecommerce">
194 <div class="portfolio-image">
195 <div class="image-placeholder">🛒</div>
196 </div>
197 <div class="portfolio-content">
198 <h3>E-commerce Platform</h3>
199 <p>Fully responsive online store with optimized images and fast checkout flow.</p>
200 <div class="portfolio-tech">
201 <span class="tech-tag">Responsive Images</span>
202 <span class="tech-tag">Fast Checkout</span>
203 <span class="tech-tag">Accessibility</span>
204 </div>
205 <div class="portfolio-actions">
206 <a href="#" class="btn btn-sm">View Project</a>
207 <a href="#" class="btn btn-sm btn-secondary">Live Demo</a>
208 </div>
209 </div>
210 </article>
211
212 <article class="portfolio-item" data-category="website">
213 <div class="portfolio-image">
214 <div class="image-placeholder">🎨</div>
215 </div>
216 <div class="portfolio-content">
217 <h3>Creative Agency</h3>
218 <p>Artistic portfolio site with advanced CSS animations and responsive typography.</p>
219 <div class="portfolio-tech">
220 <span class="tech-tag">CSS Animations</span>
221 <span class="tech-tag">Fluid Typography</span>
222 <span class="tech-tag">Creative Design</span>
223 </div>
224 <div class="portfolio-actions">
225 <a href="#" class="btn btn-sm">View Project</a>
226 <a href="#" class="btn btn-sm btn-secondary">Live Demo</a>
227 </div>
228 </div>
229 </article>
230 </div>
231 </div>
232 </section>
233
234 <!-- Contact Section -->
235 <section id="contact" class="contact-section" aria-labelledby="contact-title">
236 <div class="container">
237 <div class="section-header">
238 <h2 id="contact-title" class="section-title">Get In Touch</h2>
239 <p class="section-subtitle">Ready to create something amazing together?</p>
240 </div>
241
242 <div class="contact-content">
243 <div class="contact-info">
244 <div class="contact-item">
245 <div class="contact-icon">📧</div>
246 <div class="contact-details">
247 <h3>Email</h3>
248 <p>[email protected]</p>
249 </div>
250 </div>
251 <div class="contact-item">
252 <div class="contact-icon">📱</div>
253 <div class="contact-details">
254 <h3>Phone</h3>
255 <p>+1 (555) 123-4567</p>
256 </div>
257 </div>
258 <div class="contact-item">
259 <div class="contact-icon">🌍</div>
260 <div class="contact-details">
261 <h3>Location</h3>
262 <p>San Francisco, CA</p>
263 </div>
264 </div>
265 </div>
266
267 <form class="contact-form" id="contactForm" novalidate>
268 <div class="form-group">
269 <label for="name">Name *</label>
270 <input type="text" id="name" name="name" required
271 aria-describedby="name-error">
272 <div id="name-error" class="error-message" role="alert"></div>
273 </div>
274
275 <div class="form-group">
276 <label for="email">Email *</label>
277 <input type="email" id="email" name="email" required
278 aria-describedby="email-error">
279 <div id="email-error" class="error-message" role="alert"></div>
280 </div>
281
282 <div class="form-group">
283 <label for="subject">Subject</label>
284 <input type="text" id="subject" name="subject">
285 </div>
286
287 <div class="form-group">
288 <label for="message">Message *</label>
289 <textarea id="message" name="message" rows="5" required
290 aria-describedby="message-error"></textarea>
291 <div id="message-error" class="error-message" role="alert"></div>
292 </div>
293
294 <button type="submit" class="btn btn-primary btn-full">
295 <span class="btn-text">Send Message</span>
296 <span class="btn-loading" style="display: none;">Sending...</span>
297 </button>
298 </form>
299 </div>
300 </div>
301 </section>
302 </main>
303
304 <!-- Footer -->
305 <footer class="site-footer" role="contentinfo">
306 <div class="container">
307 <div class="footer-content">
308 <div class="footer-info">
309 <div class="footer-logo">
310 <span class="logo-text">AJ</span>
311 </div>
312 <p>Creating responsive digital experiences that work beautifully across all devices.</p>
313 </div>
314
315 <div class="footer-links">
316 <h3>Quick Links</h3>
317 <ul>
318 <li><a href="#home">Home</a></li>
319 <li><a href="#about">About</a></li>
320 <li><a href="#portfolio">Portfolio</a></li>
321 <li><a href="#contact">Contact</a></li>
322 </ul>
323 </div>
324
325 <div class="footer-social">
326 <h3>Connect</h3>
327 <div class="social-links">
328 <a href="#" aria-label="LinkedIn" class="social-link">💼</a>
329 <a href="#" aria-label="GitHub" class="social-link">🐙</a>
330 <a href="#" aria-label="Twitter" class="social-link">🐦</a>
331 <a href="#" aria-label="Dribbble" class="social-link">🏀</a>
332 </div>
333 </div>
334 </div>
335
336 <div class="footer-bottom">
337 <p>© 2024 Alex Johnson. Built with responsive design principles.</p>
338 <div class="footer-performance">
339 <span id="performanceInfo">Performance: Optimized</span>
340 </div>
341 </div>
342 </div>
343 </footer>
344
345 <!-- Back to Top -->
346 <button class="back-to-top" id="backToTop" aria-label="Back to top">
347 ↑
348 </button>
349 </div>
350</body>
351</html>This comprehensive responsive website project demonstrates all the concepts learned throughout the course:
Mobile-First Architecture:
Responsive Grid Systems:
Fluid Typography:
Performance Optimization:
Accessibility Integration:
Interactive Features:
This project serves as a complete portfolio piece demonstrating mastery of all responsive design principles covered in the course.
Congratulations on completing the Responsive Web Design course! You now have comprehensive knowledge of creating mobile-first, accessible, and performant responsive websites. Consider exploring advanced CSS courses like CSS Grid & Flexbox mastery or CSS Animations to further enhance your responsive design skills.
Your progress is saved in this browser, on this device only.