Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 4 min read

5 pricing section patterns (with copy-paste HTML/CSS)

A pricing section has one job: help a visitor pick a plan without thinking too hard. After building a lot of them, these are the five patterns we keep coming back to, plus a small HTML/CSS starting point for the most com

5 pricing section patterns (with copy-paste HTML/CSS)

A pricing section has one job: help a visitor pick a plan without thinking too hard. After building a lot of them, these are the five patterns we keep coming back to, plus a small HTML/CSS starting point for the most common one.

Three plans with the middle one highlighted and a yearly/monthly toggle

1. Three cards, middle one highlighted

The default for SaaS, and still the best place to start. Put the plan you want most people on in the middle, give it a "Most popular" label and a filled button. Keep the other two buttons outlined so the eye lands in the centre.

Here is a minimal, responsive version with no framework:

<section class="pricing">
  <article class="plan">
    <h3>Starter</h3>
    <p class="price">$0<span>/month</span></p>
    <ul><li>1 project</li><li>Community support</li></ul>
    <a class="btn ghost" href="#">Start free</a>
  </article>
  <article class="plan featured">
    <span class="badge">Most popular</span>
    <h3>Pro</h3>
    <p class="price">$19<span>/month</span></p>
    <ul><li>Unlimited projects</li><li>Email support</li><li>Custom domain</li></ul>
    <a class="btn" href="#">Get Pro</a>
  </article>
  <article class="plan">
    <h3>Team</h3>
    <p class="price">$49<span>/month</span></p>
    <ul><li>5 seats</li><li>Shared library</li></ul>
    <a class="btn ghost" href="#">Talk to us</a>
  </article>
</section>
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1040px; margin: 0 auto; }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px solid #e3e7e4; border-radius: 20px; background: #fff; }
.plan.featured { border: 2px solid #136b4b; box-shadow: 0 20px 40px -24px rgba(15, 42, 31, .35); }
.badge { position: absolute; top: -12px; left: 28px; padding: 2px 10px; border-radius: 99px; background: #136b4b; color: #fff; font-size: 12px; }
.price { font-size: 40px; font-weight: 700; }
.price span { font-size: 15px; font-weight: 400; color: #6b7a72; }
.plan ul { flex: 1; padding-left: 18px; }
.btn { display: block; padding: 12px; border-radius: 99px; text-align: center; background: #0f3d2c; color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: #0f3d2c; box-shadow: inset 0 0 0 1px #c9d3cd; }
@media (max-width: 760px) {
  .pricing { grid-template-columns: 1fr; }
  .plan.featured { order: -1; } /* show the recommended plan first on phones */
}

Two details in there are easy to miss: flex: 1 on the list keeps every button on the same line even when one plan has more features, and order: -1 puts the recommended plan first on mobile instead of burying it in the middle of a long scroll.

2. Monthly / yearly toggle

If you offer a yearly discount, show it as a toggle above the cards and state the saving in plain words ("2 months free" reads better than "save 16.7%"). Default the toggle to the option you'd rather sell, and make sure the price under each card changes without a page reload.

3. Comparison table under the cards

Cards sell, tables reassure. Keep each card to four or five features and move the long feature list into a table below for people who want detail. On mobile, a table with three plan columns gets cramped fast; letting the visitor pick one plan at a time with tabs is usually easier to read than horizontal scrolling.

4. Single plan with a free trial

If you only have one paid plan, don't invent three. One clear card with the price, what's included and a trial button converts better than artificial tiers that exist only to make the middle one look reasonable.

5. Usage-based slider

For products priced per seat or per volume, a slider that updates the price live answers "what will I pay?" before the visitor has to ask. Show the number for a typical customer as the default position, not the minimum.

A usage-based pricing slider

Small details that matter

  • Show the currency and the billing period right next to the number.
  • Put an FAQ directly under pricing: refunds and cancellation are the questions people actually have at that moment.
  • Keep every price in one place in your code. Pricing tends to appear on the pricing page, the FAQ, structured data, emails and comparison pages, and it's easy to update four of them and miss the fifth.

Disclosure: this post was written by an AI agent working for the Ariva team. We make Ariva, a library of ready-made website sections; if you'd rather paste a finished pricing section into Webflow, Framer, Figma or plain HTML, there are several in the pricing category.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.