Build a complete, responsive landing page for a made-up product, from semantic HTML to layout, colour, responsive tweaks, a Tailwind section and going live.
30 min read0/5 questions
Time to put the whole course together. In this project you will build a landing page for Leafnote, a made-up app that reminds you when to water your houseplants. A landing page is the single page a product uses to explain itself and get people to sign up, and it is one of the most common things front-end developers build. You will work the way professionals do: content and structure first, then layout, then typography and colour, then responsive tweaks, then a section rebuilt in Tailwind. Every step has a live editor, and at the end you will have a page you could put online today.
Step 1: Plan the content
Before writing any code, decide what the page has to say. Designers call this content first: the layout should serve the words, not the other way round. Leafnote's page needs five parts:
Header: the logo and a few links.
Hero: the big opening section with a headline, one sentence of explanation and a sign-up button.
Features: three reasons to care.
Pricing: a free plan and a paid plan.
Footer: small print and links.
On your computer, the project is just a folder with an HTML file and a CSS file:
The Leafnote project
leafnote/
index.htmlthe page
styles.cssall the CSS
images/
hero.webpa real screenshot later
favicon.svgthe tab icon
Step 2: The semantic skeleton
Write the HTML with no CSS at all. If the page makes sense as a plain document, with a clear heading order and real landmarks, the hard part of accessibility is already done.
<header> <a href="/">Leafnote</a> <nav aria-label="Main"> <ul> <li><a href="#features">Features</a></li> <li><a href="#pricing">Pricing</a></li> </ul> </nav></header><main> <section> <h1>Never forget to water a plant again</h1> <p>Leafnote learns each plant's needs and sends one gentle reminder on the right day.</p> <a href="#pricing">Start free</a> </section> <section id="features"> <h2>Why plant people love it</h2> <ul> <li><h3>Smart schedules</h3><p>Ferns get more water than cacti.</p></li> <li><h3>One tap to log</h3><p>Watered it? Tap once, done.</p></li> <li><h3>Shared homes</h3><p>Everyone in the house sees whose turn it is.</p></li> </ul> </section> <section id="pricing"> <h2>Simple pricing</h2> </section></main><footer> <p>Leafnote is a made-up product for a coding course.</p></footer>
Preview
Look at the structure as a tree. Each landmark (header, nav, main, footer) is something a screen reader user can jump straight to, and the headings go h1, then h2, then h3 without skipping.
The Leafnote page as a tree
Quick check
The Start free link jumps to the pricing section on the same page. Why is it an a and not a button?
Need a nudge? A hint rules out a wrong answer.
Step 3: Layout
Now give the sections their shape. A centred content column, a header with the logo and links on one line, and a features grid that decides its own number of columns.
<style> body { margin: 0; font-family: system-ui, sans-serif; } .wrap { max-width: 64rem; margin-inline: auto; padding-inline: 1.25rem; } .site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-block: 1rem; } .nav ul { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; } .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; list-style: none; padding: 0; } .feature { border: 2px solid #ddd; padding: 1rem; }</style><header class="site-header"> <div class="wrap"> <a href="/">Leafnote</a> <nav class="nav" aria-label="Main"> <ul><li><a href="#features">Features</a></li><li><a href="#pricing">Pricing</a></li></ul> </nav> </div></header><section class="wrap"> <h2>Why plant people love it</h2> <ul class="feature-grid"> <li class="feature"><h3>Smart schedules</h3><p>Ferns get more water than cacti.</p></li> <li class="feature"><h3>One tap to log</h3><p>Watered it? Tap once, done.</p></li> <li class="feature"><h3>Shared homes</h3><p>Everyone sees whose turn it is.</p></li> </ul></section>
Preview
The .wrap class is a reusable container: it caps the width so lines stay readable on big screens and keeps a gutter on small ones. The feature grid uses auto-fit with minmax(12rem, 1fr), so it shows as many 12rem-plus columns as fit: one on a phone, three on a laptop, no media query needed. Change 12rem to 20rem and watch the columns drop.
Step 4: Typography and colour
With the layout in place, add personality. Put every colour and radius in custom properties on :root first. These are your design tokens, and every later rule uses them.
clamp(2rem, 7vw, 3.5rem) makes the headline fluid: it grows with the screen but never goes below 2rem or above 3.5rem. max-width: 40ch keeps the paragraph to a comfortable line length, and text-wrap: balance evens out the headline's lines. Change --brand to #6b2f5a for a plum version. Then press Tab to see the focus outline on the button: never remove it without adding your own.
Check your colours for contrast. Body text should reach at least 4.5 to 1 against its background (the WCAG AA level). Devtools and free online contrast checkers will tell you the ratio. The dark green button with white text here passes comfortably.
Step 5: Responsive tweaks
Write mobile-first: the default styles are for a phone, and media queries add changes for wider screens. The pricing section shows the pattern. On a phone the plans stack; from 40rem (640px) they sit side by side.
The preview is narrow, so you are probably seeing the stacked phone layout. Change 40rem to 20rem to watch the plans move side by side. When you test your real page, open devtools device mode and drag the width from 320px up to a wide desktop, looking for text that overflows, buttons that are too small to tap, and lines that get too long.
Put it in order6 steps
Put the build steps in the order this project uses.
Tap the steps below in the right order.
Need a nudge? A hint shows where it starts.
The finished page
Here is everything assembled into one page. Open it, read through the CSS, and make it yours: change the product, the tokens, the copy.
The hero's reminder cards are decorative, so they carry aria-hidden="true": the headline and paragraph already say everything, and a screen reader does not need to read three fake notifications.
Step 6: One section in Tailwind
To compare the two approaches, here is the features section rebuilt with Tailwind and a few brand tokens from @theme. Same HTML structure, no hand-written selectors.
HTML + TailwindEdit the code, the preview updates live
1234567891011121314151617181920212223242526
<style type="text/tailwindcss"> @theme { --color-leaf-50: #e8f3ec; --color-leaf-700: #2f6b4f; --color-ink: #1d2b24; }</style><section id="features" class="bg-leaf-50 px-5 py-12"> <div class="mx-auto max-w-5xl"> <h2 class="mb-6 text-2xl font-bold text-ink md:text-4xl">Why plant people love it</h2> <ul class="grid grid-cols-[repeat(auto-fit,minmax(14rem,1fr))] gap-4"> <li class="rounded-2xl bg-white p-6"> <h3 class="font-semibold text-ink">Smart schedules</h3> <p class="mt-1 text-slate-600">Ferns get more water than cacti.</p> </li> <li class="rounded-2xl bg-white p-6"> <h3 class="font-semibold text-ink">One tap to log</h3> <p class="mt-1 text-slate-600">Watered it? Tap once, done.</p> </li> <li class="rounded-2xl border-2 border-leaf-700 bg-white p-6"> <h3 class="font-semibold text-leaf-700">Shared homes</h3> <p class="mt-1 text-slate-600">Everyone sees whose turn it is.</p> </li> </ul> </div></section>
Preview
Change --color-leaf-700 to another colour and the highlighted card follows. Try adding hover:-translate-y-1 transition to each li. Tailwind has no ready-made class for the auto-fit grid, so it uses an arbitrary value (commas are fine inside the brackets; only spaces need underscores). In a React project, the repeated card classes would become a FeatureCard component.
Step 7: Accessibility and performance checklist
Before you call it done, go through this list. It is the same list a careful reviewer would use.
Accessibility
One h1, and headings in order without skipping levels.
Landmarks: header, nav, main, footer.
Every meaningful image has useful alt text; decorative ones have alt="" or aria-hidden="true".
Every link and button can be reached with Tab and shows a visible focus style.
Text contrast is at least 4.5 to 1.
The page has lang="en" on the html element and a descriptive title.
Performance
Images are compressed, in WebP or AVIF, with width and height set so the layout does not jump while they load.
Images below the first screen use loading="lazy".
The viewport meta tag is present: <meta name="viewport" content="width=device-width, initial-scale=1">.
Scripts, if any, use defer.
Run Lighthouse in Chrome devtools and fix what it flags.
Match the pairs0/5 matched
Match each checklist item to why it matters.
Choose an item, then its match on the other side.
Quick check
Lighthouse reports a high Cumulative Layout Shift: the text jumps down when the hero image appears. What is the most likely fix?
Need a nudge? A hint rules out a wrong answer.
Step 8: Put it online
Your page is just static files: HTML, CSS and images, with no server code. That means you can host it free on many services. The general steps are the same everywhere:
Put the project in a Git repository and push it to GitHub (or GitLab).
Choose a static host. GitHub Pages serves a repository straight from a branch: in the repository's settings, open Pages, pick the branch and folder, and it gives you an address. Netlify, Vercel and Cloudflare Pages do the same and also let you drag a folder onto their website.
Check the live URL on your phone, run Lighthouse again, and fix anything that differs from your machine.
Optional: add a custom domain. Buy a domain from a registrar and follow the host's instructions to point it at your site. Hosts add HTTPS for you.
From then on, every push to the branch updates the live site. If you later build the Tailwind version with Vite, the host runs npm run build and serves the dist folder it creates.
Quick check
Why can this landing page be hosted on GitHub Pages without any server setup?
Need a nudge? A hint rules out a wrong answer.
Key terms
landing page
A single page that explains a product and leads visitors to one action, like signing up.
hero
The large opening section at the top of a page, with the main headline and call to action.
call to action
The main thing you want a visitor to do, usually a prominent button like Start free.
content first
Deciding what the page says before designing how it looks.
layout shift
Content jumping as things load. Image dimensions and reserved space prevent it.
static site
A site made of files that are the same for every visitor, hostable without a server.
Lighthouse
A tool in Chrome devtools that audits performance, accessibility, SEO and best practices.