You built a website in MULT-120. Now it needs to work on every screen size, look like it was designed by someone who knows what they're doing, and feel alive when people interact with it.
This course covers the four skills that separate a basic HTML page from a real website: responsive design, modern layout systems, interactive elements, and an understanding of the CMS tools that run most of the web.
Over 60% of web traffic comes from mobile devices. If your site doesn't work on a phone, it doesn't work โ period.
What "Responsive" Means
A responsive website adapts its layout, sizing, and content presentation based on the device viewing it. Same HTML, different appearance. This is done entirely with CSS.
Mobile-First Design
The modern approach is mobile-first: design for the smallest screen first, then add complexity for larger screens. Why?
- Forces you to prioritize content โ small screens have no room for fluff
- Mobile CSS is simpler (single column, stacked elements)
- Adding features for larger screens is easier than removing them for small ones
- Google indexes mobile-first, so your SEO depends on it
Media Queries
Media queries are CSS rules that apply only when certain conditions are met โ usually screen width:
@media (min-width: 640px)โ applies at 640px and wider (tablet+)@media (min-width: 1024px)โ applies at 1024px and wider (desktop+)@media (max-width: 639px)โ applies below 640px (mobile only)
With mobile-first, your base CSS is the mobile layout. Then you use min-width media queries to progressively enhance for larger screens.
Common Breakpoints
- 640px โ small tablets, large phones in landscape
- 768px โ tablets
- 1024px โ small laptops, tablets in landscape
- 1280px โ standard desktops
Don't obsess over exact numbers. The goal is to set breakpoints where your content breaks, not where specific devices are. Resize your browser and add a breakpoint wherever things start looking bad.
Viewport Meta Tag
Without this tag in your HTML <head>, mobile browsers will render your page at desktop width and zoom out:
<meta name="viewport" content="width=device-width, initial-scale=1">
You added this in MULT-120. If you forgot, add it now. Nothing else in this module works without it.
Responsive Units
%โ relative to parent element. Good for widths.vw/vhโ relative to viewport width/height.100vw= full screen width.remโ relative to root font size. Use for fonts and spacing.1rem= 16px by default.emโ relative to parent font size. Useful but can cascade confusingly.clamp()โ sets a minimum, preferred, and maximum value.clamp(1rem, 2.5vw, 2rem)gives you fluid typography.
Rule of thumb: use rem for fonts and spacing, % for widths, and avoid px for anything that needs to scale.
๐ก Key Takeaway
Mobile-first isn't a preference โ it's the standard. Write your base CSS for phones, then use min-width media queries to enhance for larger screens.
๐จ Exercise 2.1: Make Your MULT-120 Site Responsive
Take the website you built in MULT-120 and make it responsive:
- Confirm your viewport meta tag is in place
- Open your site and resize the browser from desktop width down to 320px โ note everything that breaks
- Rewrite your CSS mobile-first: start with a single-column layout, then use
@media (min-width: 768px)to add the wider layout - Replace any fixed
pxwidths with%ormax-width - Test on your actual phone (use your local IP or deploy to GitHub Pages)
Deliverable: Your MULT-120 site, now fully responsive. Screenshot it at 375px (mobile), 768px (tablet), and 1280px (desktop).
Before Flexbox and Grid, web layouts involved hacks โ floats, clearfixes, inline-block tricks. Those days are over. These two systems handle 99% of layout needs, and understanding them is non-negotiable.
Flexbox: One-Dimensional Layout
Flexbox handles layout in one direction at a time โ either a row or a column. It's perfect for:
- Navigation bars
- Card rows
- Centering content (vertically and horizontally)
- Distributing space between elements
Essential Flexbox Properties
On the container (parent):
display: flexโ activates flexboxflex-directionโrow(default) orcolumnjustify-contentโ horizontal alignment:flex-start,center,space-between,space-aroundalign-itemsโ vertical alignment:stretch,center,flex-start,flex-endflex-wrapโnowrap(default) orwrap(items wrap to next line)gapโ spacing between items. Use this instead of margins.
On the items (children):
flex: 1โ item grows to fill available spaceflex: 0 0 200pxโ item stays fixed at 200pxorderโ reorder items without changing HTML
CSS Grid: Two-Dimensional Layout
Grid handles rows and columns simultaneously. It's the right choice for:
- Full page layouts
- Image galleries
- Dashboard-style interfaces
- Any layout where you need precise control over both axes
Essential Grid Properties
display: gridโ activates gridgrid-template-columnsโ defines columns.1fr 1fr 1fr= three equal columns.repeat(3, 1fr)= same thing.grid-template-rowsโ defines rows. Often left to auto-size.gapโ spacing between grid cellsgrid-column: span 2โ item spans two columnsgrid-template-columns: repeat(auto-fit, minmax(250px, 1fr))โ responsive grid that auto-wraps. This one line replaces a media query.
When to Use Which
- Flexbox for components: navbars, button groups, card rows, centering
- Grid for page structure: overall layout, galleries, complex arrangements
- They nest perfectly โ use Grid for the page, Flexbox inside each Grid cell
If you're fighting CSS to get something to line up, you're probably using the wrong layout system. Switch between Flex and Grid until one feels natural for the job.
๐ก Key Takeaway
Flexbox for rows/columns of items, Grid for full layouts. Learn both โ they solve different problems and work great together.
๐จ Exercise 2.2: Build a 3-Page Site with Navigation
Build a new 3-page website from scratch using Flexbox and Grid:
- Create a navigation bar using Flexbox (logo left, links right, collapses on mobile)
- Build the homepage with a CSS Grid layout: hero section, 3-column feature grid, footer
- Build an about page with a two-column layout (image + text) that stacks on mobile
- Build a gallery/portfolio page using
repeat(auto-fit, minmax(250px, 1fr))for a responsive grid - All three pages share the same nav and footer
- The entire site must be responsive without any
floatorposition: absolutehacks
Deliverable: A 3-page responsive site using only Flexbox and Grid for layout. Push it to GitHub Pages or deploy it anywhere accessible.
Static sites feel dead. A few well-placed animations and interactive touches make your site feel professional and alive โ without JavaScript.
CSS Transitions
Transitions animate the change between two states of a property. They're triggered by state changes like :hover, :focus, or class toggles.
transition: property duration easingโ e.g.,transition: background-color 0.3s easetransition: all 0.2s easeโ transitions all changed properties (use sparingly, be specific when you can)- Common properties to transition:
color,background-color,transform,opacity,box-shadow,border-color
Performance tip: Only transform and opacity are GPU-accelerated. Animating width, height, or top causes layout recalculations and janky performance.
Hover Effects
Hover states are the most common interactive touch. Some practical patterns:
- Scale on hover:
transform: scale(1.05)โ subtle zoom effect on cards or images - Shadow lift: Add or increase
box-shadowon hover to make elements feel like they're lifting off the page - Color shifts: Change background or text color. Combine with
transitionfor smoothness. - Underline animation: Use a
::afterpseudo-element withtransform: scaleX(0)โscaleX(1)for animated underlines
CSS Animations with @keyframes
Keyframe animations run automatically (not just on hover) and can loop, reverse, or play once:
- Define the animation with
@keyframes name { from { } to { } } - Apply it with
animation: name duration easing delay iteration-count direction - Common uses: fade-in on page load, pulsing buttons, subtle background movement, loading spinners
Scroll-Triggered Effects
For elements that animate when scrolled into view, you have two options:
- CSS-only: The new
animation-timeline: view()(limited browser support as of 2026, but growing) - JavaScript: Use
IntersectionObserverto add a class when an element enters the viewport, then animate that class with CSS
The IntersectionObserver approach is a few lines of JavaScript and works everywhere:
- Create the observer, set a threshold (e.g., 0.1 = 10% visible)
- When the element enters view, add a class like
.visible - CSS:
.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; } - CSS:
.fade-in.visible { opacity: 1; transform: translateY(0); }
What Not To Do
- Don't animate everything. If every element bounces, slides, and fades, your site feels like a carnival.
- Don't slow things down. Most transitions should be 200-400ms. Anything over 500ms feels sluggish.
- Respect
prefers-reduced-motion. Some users disable animations for accessibility. Wrap your animations:@media (prefers-reduced-motion: no-preference) { }
๐ก Key Takeaway
Animations should enhance, not distract. Use transitions on hover states, subtle fade-ins on scroll, and keep durations under 400ms. Always respect prefers-reduced-motion.
๐จ Exercise 2.3: Add Animations and Hover Effects
Take your 3-page site from Exercise 2.2 and add interactive polish:
- Add hover transitions to all links and buttons (color change + timing)
- Add a scale + shadow hover effect to your gallery/portfolio cards
- Add a fade-in animation on the homepage hero section (using
@keyframes) - Add scroll-triggered fade-ins to at least 3 elements using IntersectionObserver
- Add an animated underline effect to your navigation links
- Add a
prefers-reduced-motionmedia query that disables all animations
Deliverable: Your 3-page site, now with smooth interactions. Record a short screen capture showing the hover effects and scroll animations in action.
You know HTML and CSS now. That puts you ahead of 90% of creators. But you should also understand the tools that most of the web actually runs on โ because sometimes a CMS is the right tool for the job.
What Is a CMS?
A Content Management System lets you create, edit, and publish web content without writing code for every page. You write content; the CMS handles the template, navigation, and publishing.
WordPress
WordPress powers ~43% of all websites. Two versions exist:
- WordPress.com โ Hosted service. Free tier with limitations, paid tiers for custom domains and features. Good for blogging.
- WordPress.org โ Self-hosted. Download the software, install on your own server. Full control, unlimited themes and plugins. Requires a hosting provider ($5-20/mo).
When to use WordPress: blogs, content-heavy sites, sites that need frequent updates, sites where non-technical people need to add content.
Why knowing HTML/CSS matters: WordPress themes are built with HTML, CSS, and PHP. When a theme doesn't do exactly what you want (it won't), you can customize it instead of being stuck.
Squarespace
Squarespace is a drag-and-drop website builder. No code required, no hosting to manage.
- Strengths: Beautiful templates, built-in e-commerce, great for portfolios and small businesses
- Limitations: Less flexible than WordPress, more expensive ($16-49/mo), harder to customize beyond what templates offer
- When to use: You want a polished site fast and don't need deep customization
Other Platforms Worth Knowing
- Wix โ Similar to Squarespace, more design freedom but messier code output. Good for small business sites.
- Shopify โ E-commerce focused. If you're selling physical or digital products, this is the standard.
- Carrd โ Single-page sites. $19/year for pro. Perfect for link-in-bio pages, landing pages, or simple portfolios.
- GitHub Pages โ Free static site hosting. You write HTML/CSS/JS, push to GitHub, and it's live. No CMS, but no cost and full control.
- Linktree / Beacons โ Link-in-bio tools. Not full websites, but most creators need one. Linktree is simpler; Beacons has more features.
When to Code vs. When to Use a Builder
- Code from scratch when: you want full control, unique design, fast load times, or you're learning (which you are)
- Use a builder when: speed matters more than customization, you need e-commerce fast, or a non-technical collaborator needs to edit the site
- Use a CMS when: the site has lots of content that changes often (blog, product catalog, community)
Knowing HTML and CSS means you're never locked into a platform. You can always build it yourself or customize whatever tool you choose.
๐ก Key Takeaway
Website builders and CMS platforms are tools, not crutches. Knowing when to use WordPress, when to use Squarespace, and when to code from scratch makes you a more versatile creator.
๐จ Exercise 2.4: Platform Comparison (Course Deliverable)
Research and compare the options for your creator website:
- Sign up for a free trial of WordPress.com and Squarespace
- Try to recreate your 3-page site's homepage on each platform (spend 30 minutes per platform)
- Write a comparison document: What was easier? What was frustrating? What limitations did you hit?
- Make a decision: which approach will you use for your creator website, and why?
- If you choose a CMS, customize one element using the HTML/CSS skills you learned in this course
Deliverable: A comparison document with screenshots, and your decision with rationale. If using a CMS, include a before/after of your customization.
๐ก Course Complete
You can now build responsive, modern websites with professional layouts and interactive polish โ and you know when to code from scratch vs. use a platform. Next up: WRIT-103 Writing for Digital Media, where you'll learn to write content that actually converts.