Lesson 23 of 23

In progress

Course progress

HTML and CSS

Capstone: a responsive landing page

Combine semantic HTML, Flexbox, Grid, tokens and media queries into one accessible landing page you can actually ship.

This is the last lesson in the track. You will build one page with a header, hero, feature cards, a call to action and a footer, using only what you have learned, and check it the way a reviewer would.

What you will learn

  • Assemble a page from landmarks, sections and one clear heading hierarchy.
  • Reuse tokens, Grid and Flexbox instead of inventing new values per section.
  • Review the result with keyboard, zoom, contrast and a narrow viewport.

What you will build

A single-page site for a fictional course, with:

  • A landmark header with a skip link and a navigation list.
  • A hero with one h1, a short paragraph and two actions.
  • Three feature cards in a Grid that reflows without media queries.
  • A call-to-action band with a contrast-checked button.
  • A footer with links and a copyright line.
  • Tokens for colour, spacing and radius, plus a dark-mode token set.

Structure before styling

HTML
Editable. Runs in your browser.





Press Run to see the output.

Notice the decisions: one h1, headings nested h2 then h3, an aria-labelledby naming the features section, and two labelled nav elements. Those are not extras; they are the structure the styling hangs on.

The styles

HTML
Editable. Runs in your browser.





Press Run to see the output.

Everything here has appeared earlier in the track: tokens, a container with fluid padding, Flexbox for the header, Grid with auto-fit for the cards, clamp() for type and space, and a dark token override.

Review it like a stranger

Before calling it done, run the checklist on a fresh browser profile where nothing is cached, because a warm cache hides first-load problems. Then repeat it once with the window narrow and once at 200 percent zoom; the order of failures will tell you which rule is doing too much.

  1. Keyboard: Tab from the top. The skip link appears first, every link gets a visible ring, nothing traps focus.
  2. Zoom: at 200 percent, the cards stack and no text is clipped.
  3. Contrast: body text, the button label and the CTA paragraph all clear 4.5:1. The light button on the dark band is the pair most likely to fail.
  4. Headings: one h1, then h2 for sections and h3 for cards. No skipped levels.
  5. Images: if you add any, every one has alt text and explicit dimensions.
  6. Widths: no horizontal scrollbar at 320 pixels.

Two details worth fixing in most first attempts: the dark-mode button text colour, because a light brand colour behind white text fails, and the CTA paragraph, because white at low opacity on purple is a common contrast miss.

Extending it

Add a testimonial section with a blockquote and cite, a pricing table using the table semantics from lesson 6, or a small form using the labelled inputs from lesson 8. Each addition should reuse the tokens rather than introduce new colours.

The JavaScript track continues from this page: a mobile menu toggle, a theme switch and form validation without a page reload.

Building the page section by section without ever resizing it produces a layout that only works at the width you designed on. Resize after each section, not at the end, when the fix is cheaper and the cause is obvious.

Add a fourth card and a testimonial section to the page. Keep the Grid reflowing, make the quote readable at 65 characters, and ensure the new section uses existing tokens.

Show solution
HTML
Editable. Runs in your browser.





Press Run to see the output.

The quote is capped at a readable measure, the border gives it emphasis without an icon, and the colours match the existing tokens rather than introducing a new palette.

Recap

  • Build structure first: landmarks, one h1, labelled sections, then style.
  • Reuse tokens, Grid auto-fit, Flexbox and fluid clamp() spacing rather than new values.
  • Review with keyboard, zoom, contrast and a narrow viewport before calling it done.

You have finished HTML and CSS. Next, the JavaScript track adds behaviour to pages like this one.

How long should a landing page be?
As long as it needs to answer the visitor’s questions. One strong section beats five padded ones, and every extra section is more to keep accessible and fast.
Should I use a framework now?
Not yet. You can build this page with the platform. A framework becomes useful when you have repeated state and components, and you will recognise that point more clearly after the JavaScript track.

Progress is saved in this browser only. No account, no email.

Admin

About the author

Admin

Instructor and technical writer at tutorials.in

Writes beginner lessons for tutorials.in. Each lesson is checked against the language or tool documentation, and examples are run before publishing.

Reviewed by the editorial team before publishing. Last updated November 16, 2026.