Tailwind Landing Page

A landing page introduces one idea and invites the visitor to take one action. Building one connects everything learned so far: spacing, color, typography, flexbox, grid, and responsive classes. This walkthrough assembles a simple page from five sections, one small piece at a time.

Planning the Structure

Sketch the page before writing any class. Each section has one job, and the order guides the visitor from curiosity to action.

┌─────────────────────────────┐
│ 1. Header   logo + menu     │
├─────────────────────────────┤
│ 2. Hero    headline + button│
├─────────────────────────────┤
│ 3. Features three cards     │
├─────────────────────────────┤
│ 4. Call to action           │
├─────────────────────────────┤
│ 5. Footer   links + notice  │
└─────────────────────────────┘

The Page Wrapper

Set the base text color, font smoothing, and background on the body or a wrapper. Every section inherits those settings.

<body class="bg-white text-gray-800 antialiased">

Header

A flex row pushes the logo left and the links right. A container keeps content centered on wide screens, and the menu hides on phones.

<header class="border-b">
  <div class="mx-auto flex max-w-6xl items-center justify-between px-4 py-4">
    <a href="/" class="text-xl font-bold text-sky-600">BrandName</a>
    <nav class="hidden gap-6 text-sm md:flex">
      <a href="#features" class="hover:text-sky-600">Features</a>
      <a href="#contact" class="hover:text-sky-600">Contact</a>
    </nav>
  </div>
</header>

Hero Section

The hero carries the main message. Use a large heading, a short supporting sentence, and a single button. Centered text works well for focused pages.

<section class="bg-linear-to-b from-sky-50 to-white px-4 py-16 text-center md:py-24">
  <h1 class="mx-auto max-w-3xl text-3xl font-bold leading-tight md:text-5xl">
    Plan your week in one simple place
  </h1>
  <p class="mx-auto mt-4 max-w-xl text-gray-600 md:text-lg">
    A friendly planner for notes, tasks, and reminders.
  </p>
  <a href="#contact" class="mt-8 inline-block rounded-lg bg-sky-600 px-6 py-3 font-medium text-white hover:bg-sky-700 focus:outline-none focus:ring-2 focus:ring-sky-400">
    Get started
  </a>
</section>

Feature Grid

One column on phones, three columns on larger screens. The grid handles the change with two classes.

<section id="features" class="mx-auto max-w-6xl px-4 py-16">
  <div class="grid gap-6 md:grid-cols-3">
    <div class="rounded-xl border p-6 shadow-sm">
      <h3 class="font-semibold">Quick notes</h3>
      <p class="mt-2 text-sm text-gray-600">Capture ideas in seconds.</p>
    </div>
    <!-- repeat for two more cards -->
  </div>
</section>

Phone:    [Card]        Desktop:  [Card] [Card] [Card]
          [Card]
          [Card]

Call to Action Band

<section id="contact" class="bg-sky-600 px-4 py-14 text-center text-white">
  <h2 class="text-2xl font-bold">Ready to try it?</h2>
  <a href="#" class="mt-6 inline-block rounded-lg bg-white px-6 py-3 font-medium text-sky-700">Create a free account</a>
</section>

Footer

<footer class="border-t px-4 py-8 text-center text-sm text-gray-500">
  <p>&copy; 2026 BrandName. All rights reserved.</p>
</footer>

Design Choices Explained

Each decision in this page follows a rule. The container width of max-w-6xl keeps lines short on large monitors. Vertical padding grows from py-16 to md:py-24 so the hero feels roomy on desktops without wasting phone space. The button uses a strong color, a clear label, and a focus ring so keyboard visitors can find it. Only one filled button sits in the hero, which signals the main action.

Headings follow a logical order: one H1 for the page, H2 for sections, and H3 for cards. Search engines and screen readers use that order to understand the page. Visual size comes from classes and never from the tag choice.

Working Order for Beginners

Build the page from the top down and test after each section. Write the header and open the file in a browser. Add the hero and resize the window. Continue with one section at a time. Small steps reveal mistakes early, while a full page written in one pass hides them among many classes.

Start every section for phones. Use plain classes first, and add md: or lg: prefixes after the narrow layout looks right. Mobile first writing keeps the code short, because most base styles already suit larger screens.

Reusing Parts

The feature card appears three times with the same classes. Copying long class lists invites mistakes. Move repeated markup into a component in your framework, a template partial, or a loop. A change to the card then happens in one place and reaches every copy.

Content Honesty and Ad Policy Basics

Landing pages that run advertising must match the advertisement. Describe the product accurately and avoid exaggerated promises, fake countdown timers, and claims you cannot prove. Show real contact details, a privacy policy link, and clear terms. Honest pages build trust and meet the standards of major ad platforms.

Improvement Ideas

  • Add a dark mode with dark: variants.
  • Swap the plain grid cards for icon cards from an icon library.
  • Compress images and add width and height attributes to prevent layout shift.
  • Test the page with a keyboard and a screen reader before publishing.

Small sections joined with consistent spacing produce a complete page. Reuse the pattern for any product or service by changing the words, colors, and images.