HTML and CSS Foundations
Build semantic, accessible and responsive interfaces from a blank page, and explain why each layout and styling decision works.
What you will be able to do
#- Write semantic HTML that exposes an accurate accessibility tree.
- Build accessible forms with labels, native validation and clear error messaging.
- Lay out components with normal flow, Flexbox and CSS Grid from first principles.
- Make layouts responsive with mobile-first media queries, container queries and fluid sizing.
- Apply modern CSS: cascade layers, custom properties, :has() and reduced-motion support.
Prerequisites
#No prior course is required. This course starts from first principles.
Lessons
#Document structure and the element tree
beginner · 25 minutes · 2 exercises
Explain how the browser turns HTML source into a DOM tree.
Semantic landmarks and sectioning content
beginner · 30 minutes · 1 exercises
Choose between header, nav, main, section, article and aside based on meaning.
Text-level semantics and inline elements
beginner · 25 minutes · 1 exercises
Pick the inline element that carries the correct meaning.
Links, images and media with accessible alternatives
beginner · 30 minutes · 1 exercises
Write link text that makes sense out of context.
Lists, tables and data semantics
beginner · 30 minutes · 1 exercises
Use list elements for navigation and grouped content.
Form element anatomy and native controls
beginner · 30 minutes · 2 exercises
Choose the correct native control for a given input.
Labels, fieldsets and accessible names
beginner · 30 minutes · 2 exercises
Associate labels with controls using for and id or wrapping.
Input types, validation and constraint attributes
intermediate · 35 minutes · 2 exercises
Apply native constraint validation attributes correctly.
Form submission, methods and encoding
intermediate · 30 minutes · 2 exercises
Choose between GET and POST for a given form.
Error messaging and inline validation UX
intermediate · 35 minutes · 2 exercises
Associate an error message with the field it describes.
The accessibility tree and assistive technology model
intermediate · 30 minutes · 2 exercises
Describe how the DOM maps to the accessibility tree.
Keyboard navigation and focus management
intermediate · 35 minutes · 2 exercises
Explain the difference between focus order and DOM order.
Color contrast, target size and visual accessibility
intermediate · 30 minutes · 2 exercises
Check text and UI contrast against WCAG 2.2 AA thresholds.
ARIA roles, states and properties: when to use them
advanced · 40 minutes · 2 exercises
Decide when a native element is available and when ARIA is required.
Landmarks, skip links and page structure for screen readers
intermediate · 30 minutes · 1 exercises
Provide a skip link that becomes visible on focus.
Normal flow, the box model and box-sizing
beginner · 35 minutes · 2 exercises
Compute the rendered size of a box from its content, padding, border and margin.
Display types and formatting contexts
intermediate · 35 minutes · 2 exercises
Distinguish block, inline and inline-block behavior.
Flexbox: axes, alignment and distribution
intermediate · 40 minutes · 2 exercises
Align and distribute items along the main and cross axes.
CSS Grid: tracks, areas and implicit grids
intermediate · 40 minutes · 2 exercises
Define a grid with columns, rows and gaps.
Positioning and stacking contexts
advanced · 40 minutes · 2 exercises
Choose between static, relative, absolute, fixed and sticky positioning.
Logical properties and writing modes
advanced · 35 minutes · 1 exercises
Replace physical properties with logical equivalents.
Viewport meta and mobile-first thinking
beginner · 30 minutes · 2 exercises
Explain what the viewport meta tag does on mobile.
Media queries and container queries
intermediate · 40 minutes · 2 exercises
Write media queries for viewport conditions.
Fluid typography and spacing with clamp
intermediate · 35 minutes · 2 exercises
Use clamp to scale type and space between a minimum and a maximum.
Responsive images: srcset, sizes and picture
advanced · 40 minutes · 2 exercises
Serve an appropriately sized image for the viewport and pixel density.
Intrinsic and responsive layout patterns
advanced · 40 minutes · 2 exercises
Build layouts that adapt without explicit breakpoints.
Cascade layers, specificity and the @layer at-rule
advanced · 45 minutes · 2 exercises
Order the cascade by layer rather than by specificity wars.
Custom properties and design tokens
advanced · 40 minutes · 2 exercises
Define and consume custom properties for a token system.
Transitions, animations and reduced motion
advanced · 40 minutes · 2 exercises
Animate properties that are cheap to animate and avoid layout thrash.
Modern CSS: :has(), nesting, subgrid and container units
advanced · 45 minutes · 2 exercises
Use :has() to style a parent based on its children.
Study journeys
#Skip-ahead journeys never remove a requirement. The prerequisite graph always reports the full chain; a skip-ahead course only marks where an assessment may substitute for study.
Zero to frontend engineer
Absolute beginner frontend developer
Start from markup and the language, then build and ship a React and Next.js interface.
- HTML and CSS Foundationsyou are here
- JavaScript Foundations
- React and UI Engineering
- Next.js App Router Mastery
Next in this journey: JavaScript Foundations