Skip to main content

End of HTML & CSS Moderno

Course Summary & Final Capstone

Congratulations on reaching the end of HTML & CSS Moderno — 15 progressive modules spanning DOM semantics, WCAG accessibility, @layer/@scope architecture, Flexbox, CSS Grid/Subgrid, Top Layer <dialog>/Popover, <picture> media, Scroll Snap, and RTL logical properties.

15 modules · 60 lessons · 297 exercises

Every HTML & CSS challenge runs in a strict CSP sandbox with Tree-sitter CSS validation, WCAG A11y audits, and real iframe DOMRect geometry measurement at 375px / 768px / 1024px.

01 · Web Anatomy & The HTML Document

Understand how browsers parse HTML into the DOM tree, structure headings and prose, create safe links, and embed accessible lists and media.

  • DOM tree
  • <head> / <meta>
  • headings h1–h6
  • links / alt

02 · Semantic HTML5 & Page Architecture

Replace generic div soup with meaningful HTML5 landmarks, clean content sections, accessible tables, and zero-JS interactive widgets.

  • <header>/<nav>/<main>
  • <article>/<section>
  • <figure>/<time>
  • <table> / <dialog>

03 · Forms, Validation & Practical Accessibility

Master accessible form controls, explicit labels, native HTML validation, button semantics, focus order, and ARIA fundamentals.

  • <label for>
  • native validation
  • ARIA roles
  • WCAG focus / AA

04 · CSS Selectors, Cascade & Specificity

Understand how selectors match DOM elements, compute specificity scores, resolve cascade conflicts, and scale architecture with @layer and :has().

  • specificity (a,b,c)
  • @layer cascade
  • :is() / :where()
  • :has() parent selector

05 · The Box Model, Display & Modern Units

Demystify padding, border, margin collapsing, border-box sizing, normal flow, overflow handling, viewport units, and intrinsic sizing.

  • border-box
  • margin collapse
  • rem / em / ch / dvh
  • clamp() / min()

06 · Color, Contrast, Typography & Design Tokens

Craft readable typography, accessible WCAG contrast palettes with oklch(), reusable CSS custom properties, and clean Light/Dark themes.

  • oklch() / color-mix()
  • contrast >= 4.5
  • CSS variables
  • prefers-color-scheme

07 · Flexbox Layout in Depth

Master main vs cross axes, wrapping, flex-grow/shrink/basis math, min-width: 0 traps, and everyday navigation, card, and sticky-footer patterns.

  • main vs cross axis
  • flex-wrap / gap
  • flex: 1 1 0
  • auto-push nav

08 · CSS Grid Layout & Subgrid

Build deterministic two-dimensional grids using fractional tracks, media-free auto-fit minmax, named areas, and subgrid row synchronization.

  • fr & minmax()
  • auto-fit vs auto-fill
  • grid-template-areas
  • subgrid

09 · Positioning, Stacking Context & Container Queries

Understand static/relative/absolute/fixed/sticky positioning, stacking contexts behind z-index bugs, mobile-first media queries, and @container.

  • sticky + overflow: clip
  • isolation: isolate
  • @media
  • @container

10 · Transforms, Transitions & Accessible Motion

Deliver smooth 60–120 FPS compositor animations with transform and opacity, natural easing curves, keyframe loaders, and prefers-reduced-motion.

  • transform / opacity
  • cubic-bezier
  • @keyframes
  • prefers-reduced-motion

11 · Modern CSS Architecture, RTL & Debugging

Combine native CSS nesting (&), :has() state patterns, international logical properties (LTR/RTL), shadows/masks, and systematic bug hunting.

  • margin-inline
  • border-inline-start
  • container tokens
  • light-dark()

12 · Real-World Capstone Projects

Apply semantic HTML5, WCAG contrast, design tokens, Flexbox, CSS Grid/Subgrid, @container queries, and logical RTL properties end-to-end.

  • marketing landing
  • pricing subgrid
  • SaaS dashboard
  • RTL design system

13 · Top Layer UI, Popovers & Modern Forms

Build zero-JS modals and popovers in the browser Top Layer with <dialog>, popover, ::backdrop, @starting-style, and rich native HTML form controls.

  • <dialog> / ::backdrop
  • popover API
  • @starting-style
  • <datalist> / field-sizing

14 · Responsive Media, SVG, Visual Effects & Adaptive Modes

Serve crisp responsive imagery with <picture> and srcset, author accessible inline SVG, compose gradients/masks, and support print & High Contrast modes.

  • <picture> / srcset
  • accessible SVG
  • conic-gradient / mask
  • @media print / forced-colors

15 · CSS Architecture at Scale: @scope, Scroll Snap & Systems

Prevent component style leakage with @scope donut limits, craft zero-JS scroll-snap carousels, optimize rendering with content-visibility, and audit A11y patterns.

  • @scope donut limits
  • scroll-snap rails
  • content-visibility
  • skip links / aria-live

Four-Stage Final Capstone

Put the whole stack together cleanly: accessible landmarks & forms, @layer custom property theming, responsive Flexbox + Grid auto-fit layout, and RTL logical + sticky isolation.

1 · Semantic Landmarks & Accessible Form

Replace generic div soup and unlabeled controls with <main>, single <h1>, an alt-tagged hero image, and a properly associated <label for="subscriber-email">.

Exercise#html-css.boss.e1
Attempts: 0Loading…

Update the markup to use a single <main>, one <h1>, an <img alt="..."> description, <label for="subscriber-email"> connected to <input id="subscriber-email">, and a <button type="submit"> with clear label text.

Loading editor…
Show hint

Swap <div class="page"> for <main class="page">, wrap the title in <h1>, add a descriptive alt="..." to <img>, connect <label for="subscriber-email"> to the input id, and turn the fake div CTA into <button type="submit">.

Solution available after 3 attempts

2 · @layer Architecture & Contrast-Safe Tokens

Organize the stylesheet with `@layer base, components;`, define `--accent` in `:root`, and apply high-contrast white ink `#ffffff` over `#0369a1`.

Exercise#html-css.boss.e2
Attempts: 0Loading…

Declare @layer base, components; at the top, keep base box-sizing inside @layer base, style .cta inside @layer components using var(--accent) (#0369a1) as background-color and #ffffff text color.

Loading editor…
Show hint

Start with @layer base, components;, define :root { --accent: #0369a1; }, and set background-color: var(--accent); color: #ffffff; inside @layer components { .cta { ... } }.

Solution available after 3 attempts

3 · Responsive Flex Header & Auto-Fit Grid

Combine a wrapping `.site-nav` Flexbox bar with a responsive `.card-grid` using `repeat(auto-fit, minmax(220px, 1fr))` that avoids overflow at 375px.

Exercise#html-css.boss.e3
Attempts: 0Loading…

Configure .site-nav with display: flex; flex-wrap: wrap; gap: 1rem; and .card-grid with display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem;.

Loading editor…
Show hint

Add * { box-sizing: border-box; } plus display: flex; flex-wrap: wrap; on .site-nav and display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); on .card-grid.

Solution available after 3 attempts

4 · Sticky Header Clip Guard & RTL Logical Callout

Fix a broken sticky header clipped by `overflow: hidden` by switching to `overflow: clip`, isolate the shell, and convert physical left spacing into `padding-inline-start` & `border-inline-start`.

Exercise#html-css.boss.e4
Attempts: 0Loading…

Update .panel to use overflow-x: clip and isolation: isolate, .panel-head to use position: sticky; inset-block-start: 0;, and .callout to use padding-inline-start: 1rem; border-inline-start: 4px solid #0369a1;.

Loading editor…
Show hint

Replace overflow: hidden on .panel with overflow-x: clip; isolation: isolate; and swap physical left properties on .callout for padding-inline-start and border-inline-start.

Solution available after 3 attempts

Printable HTML & CSS Reference

Keep the searchable & printable HTML & CSS Moderno cheatsheet open alongside your projects.

Open Cheatsheet

Where to go next

Experiment freely with RTL layouts, Container Queries, Subgrid, and Box Outlines inside the sandbox playground — or test your debugging speed in CSS Layout Rescue.