SolutionsCase StudiesAI ToolsResourcesAboutContact
Get Your Free AI Automation Audit Book a Free 30-Minute Strategy Call
Playground~/frontend Open editor

~/css/pricing-sections

7 CSS Pricing Sections

5 Pure CSS2 with JSPublished 2026-10-05Free · no sign-up

Seven pricing page sections: three tiers with a highlighted plan, a monthly and yearly switch, a single all-inclusive plan, a feature comparison table, a usage-based estimator, plans followed by billing questions and self-serve plans with an enterprise banner.

01. Three Tiers with a Highlight

PricingSection

A full pricing section: heading, one-line promise and three plans with the middle one highlighted as Most popular. The plans are a list, the price is real text with the period, and the recommended plan says so in words, not just colour.

View code
<section class="prs1" aria-labelledby="prs1h"><h3 id="prs1h">Simple pricing</h3><p class="sub">Start free. Upgrade when you need more.</p><ul><li><b>Free</b><p class="pr">$0</p><a href="#free">Start</a></li><li class="hi"><span class="tag">Most popular</span><b>Pro</b><p class="pr">$12<small>/mo</small></p><a href="#pro">Choose Pro</a></li><li><b>Team</b><p class="pr">$29<small>/mo</small></p><a href="#team">Choose Team</a></li></ul></section>
.prs1 { width: 600px; max-width: 100%; font: 14px Inter, system-ui, sans-serif; text-align: center; }
.prs1 h3 { margin: 0; color: #101828; font-size: 24px; } .prs1 .sub { margin: 4px 0 16px; color: #475467; }
.prs1 ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.prs1 li { display: grid; gap: 6px; padding: 18px; border: 1px solid #e4e7ec; border-radius: 16px; background: #fff; }
.prs1 .hi { border: 2px solid #7f56d9; }
.prs1 .tag { justify-self: center; padding: 2px 8px; border-radius: 999px; background: #f4ebff; color: #6941c6; font-size: 11px; font-weight: 800; }
.prs1 b { color: #101828; } .prs1 .pr { margin: 0; color: #101828; font-size: 30px; font-weight: 800; } .prs1 small { color: #475467; font-size: 13px; font-weight: 500; }
.prs1 a { padding: 9px; border-radius: 8px; border: 1px solid #d0d5dd; color: #344054; font-weight: 700; text-decoration: none; }
.prs1 .hi a { border-color: #7f56d9; background: #7f56d9; color: #fff; }
.prs1 a:focus-visible { outline: 3px solid #d6bbfb; outline-offset: 2px; }

02. Monthly and Yearly Switch

PricingToggle

A billing switch above the plans swaps every price between monthly and yearly and shows the saving. The switch is a real switch with role="switch" and aria-checked, and prices are stored in data attributes so the script only swaps text.

View code
<section class="prs2"><div class="sw"><span>Monthly</span><button role="switch" aria-checked="false" aria-label="Yearly billing"><i></i></button><span>Yearly <em>save 20%</em></span></div><ul><li><b>Starter</b><p><span class="v" data-m="10" data-y="8">10</span> $/mo</p></li><li><b>Studio</b><p><span class="v" data-m="25" data-y="20">25</span> $/mo</p></li></ul></section>
.prs2 { width: 400px; max-width: 100%; font: 14px Inter, system-ui, sans-serif; color: #cbd5e1; }
.prs2 .sw { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.prs2 em { color: #4ade80; font-style: normal; font-weight: 700; font-size: 12px; }
.prs2 button { width: 46px; height: 26px; padding: 3px; border: 0; border-radius: 13px; background: #334155; cursor: pointer; }
.prs2 button i { display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.prs2 [aria-checked=true] { background: #6366f1; } .prs2 [aria-checked=true] i { transform: translateX(20px); }
.prs2 button:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.prs2 ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.prs2 li { padding: 18px; border: 1px solid #263048; border-radius: 14px; background: #111727; text-align: center; }
.prs2 b { color: #fff; } .prs2 p { margin: 6px 0 0; } .prs2 .v { color: #fff; font-size: 32px; font-weight: 800; }
var b = document.querySelector('.prs2 button');
b.onclick = function () { var y = b.getAttribute('aria-checked') !== 'true'; b.setAttribute('aria-checked', y); document.querySelectorAll('.prs2 .v').forEach(function (v) { v.textContent = y ? v.dataset.y : v.dataset.m; }); };

03. One Plan, Everything Included

PricingSimple

Some products only need one price. A single card with the price, a checklist of everything included and one button removes all comparison effort, which is often the best-converting pricing page there is.

View code
<section class="prs3"><p class="k">One plan</p><p class="pr">$9 <span>per month</span></p><ul><li>Unlimited projects</li><li>All templates</li><li>Custom domain</li><li>Email support</li></ul><a href="#start">Start 14-day trial</a><p class="n">No card needed. Cancel any time.</p></section>
.prs3 { width: 280px; max-width: 100%; box-sizing: border-box; padding: 22px; border: 1px solid #e4e7ec; border-radius: 18px; background: #fff; font: 14px Inter, system-ui, sans-serif; }
.prs3 .k { margin: 0; color: #067647; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.prs3 .pr { margin: 6px 0 14px; color: #101828; font-size: 40px; font-weight: 800; } .prs3 .pr span { color: #475467; font-size: 14px; font-weight: 500; }
.prs3 ul { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; color: #344054; }
.prs3 li::before { content: "✓"; margin-right: 8px; color: #079455; font-weight: 800; }
.prs3 a { display: block; padding: 11px; border-radius: 10px; background: #101828; color: #fff; font-weight: 700; text-align: center; text-decoration: none; }
.prs3 a:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }
.prs3 .n { margin: 8px 0 0; color: #475467; font-size: 12px; text-align: center; }

04. Plan Comparison Table

PricingTable

A feature-by-feature comparison below the plan cards. It is a real table with row and column headers, the ticks and dashes carry hidden text (Included, Not included), and the wrapper scrolls sideways on small screens.

View code
<div class="prs4" tabindex="0" role="region" aria-labelledby="prs4c"><table><caption id="prs4c">Compare plans</caption><thead><tr><th scope="col">Feature</th><th scope="col">Free</th><th scope="col">Pro</th><th scope="col">Team</th></tr></thead><tbody><tr><th scope="row">Projects</th><td>3</td><td>Unlimited</td><td>Unlimited</td></tr><tr><th scope="row">Custom domain</th><td><span aria-hidden="true">—</span><span class="sr">Not included</span></td><td><span aria-hidden="true">✓</span><span class="sr">Included</span></td><td><span aria-hidden="true">✓</span><span class="sr">Included</span></td></tr><tr><th scope="row">Roles</th><td><span aria-hidden="true">—</span><span class="sr">Not included</span></td><td><span aria-hidden="true">—</span><span class="sr">Not included</span></td><td><span aria-hidden="true">✓</span><span class="sr">Included</span></td></tr></tbody></table></div>
.prs4 { position: relative; box-sizing: border-box; width: 440px; max-width: 100%; overflow-x: auto; border: 1px solid #263048; border-radius: 14px; background: #111727; font: 13px Inter, system-ui, sans-serif; }
.prs4:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }
.prs4 table { width: 100%; border-collapse: collapse; }
.prs4 caption { padding: 12px 14px; color: #fff; font-weight: 800; font-size: 15px; text-align: left; }
.prs4 th, .prs4 td { padding: 10px 14px; border-top: 1px solid #1f2937; text-align: center; white-space: nowrap; color: #cbd5e1; }
.prs4 th[scope=row] { text-align: left; color: #e2e8f0; font-weight: 600; } .prs4 thead th { color: #94a3b8; font-size: 12px; }
.prs4 td span[aria-hidden] { font-weight: 800; }
.prs4 .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

05. Usage-Based Price Estimator

PricingCalculator

For pay-as-you-go pricing, a slider for the expected volume and a live estimate beside it. The slider is a native range input with a label, and the estimate is an output element linked to it, updated on every input event.

View code
<section class="prs5"><label for="prs5r">Emails per month: <b id="prs5n">20,000</b></label><input id="prs5r" type="range" min="1000" max="100000" step="1000" value="20000"><p>Estimated cost <output for="prs5r">$16</output> / month</p><p class="n">First 1,000 free, then $0.80 per 1,000.</p></section>
.prs5 { width: 300px; max-width: 100%; box-sizing: border-box; padding: 20px; border: 1px solid #e4e7ec; border-radius: 16px; background: #fff; font: 14px Inter, system-ui, sans-serif; color: #344054; }
.prs5 label { display: block; margin-bottom: 8px; font-weight: 600; } .prs5 label b { color: #101828; }
.prs5 input { width: 100%; accent-color: #0e7090; }
.prs5 input:focus-visible { outline: 3px solid #84adff; outline-offset: 4px; }
.prs5 p { margin: 12px 0 0; } .prs5 output { color: #101828; font-size: 28px; font-weight: 800; }
.prs5 .n { margin-top: 4px; color: #475467; font-size: 12px; }
var r = document.getElementById('prs5r'), n = document.getElementById('prs5n'), o = document.querySelector('.prs5 output');
r.oninput = function () { var v = +r.value; n.textContent = v.toLocaleString('en-US'); o.textContent = '$' + Math.max(0, Math.round((v - 1000) / 1000 * 0.8)); };
r.oninput();

06. Pricing with Questions Below

PricingFAQ

Pricing pages lose people at the last doubt, so the most common billing questions sit right under the plans in details and summary elements. Each answer is short and specific, and the disclosure works with no script.

View code
<section class="prs6"><div class="plans"><div><b>Basic</b><span>$5/mo</span></div><div><b>Plus</b><span>$15/mo</span></div></div><h3>Billing questions</h3><details><summary>Can I change plans later?</summary><p>Yes, upgrades apply at once and downgrades at the next renewal.</p></details><details><summary>Do you offer refunds?</summary><p>Yes, within 30 days of any payment.</p></details></section>
.prs6 { width: 380px; max-width: 100%; font: 14px Inter, system-ui, sans-serif; color: #cbd5e1; }
.prs6 .plans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.prs6 .plans div { display: grid; padding: 14px; border-radius: 12px; background: #1e293b; } .prs6 .plans b { color: #fff; } .prs6 .plans span { color: #a5b4fc; font-weight: 700; }
.prs6 h3 { margin: 0 0 6px; color: #fff; font-size: 15px; }
.prs6 details { border-top: 1px solid #263048; } .prs6 details:last-child { border-bottom: 1px solid #263048; }
.prs6 summary { padding: 12px 0; color: #e2e8f0; font-weight: 600; cursor: pointer; }
.prs6 summary:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.prs6 details p { margin: 0 0 12px; color: #94a3b8; }

07. Plans with Enterprise Banner

PricingSales

Self-serve plans above a full-width banner for larger customers with a Talk to sales link. Separating the enterprise offer keeps the plan cards simple, and the banner reflows from a row to a stack on narrow containers.

View code
<section class="prs7"><div class="in"><ul><li><b>Team</b><span>$29/mo</span></li><li><b>Business</b><span>$79/mo</span></li></ul><div class="ent"><div><b>Enterprise</b><p>SSO, custom contracts and a dedicated manager.</p></div><a href="#sales">Talk to sales</a></div></div></section>
.prs7 { width: 520px; max-width: 100%; container-type: inline-size; font: 14px Inter, system-ui, sans-serif; }
.prs7 ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.prs7 li { display: grid; padding: 16px; border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; } .prs7 li b { color: #101828; } .prs7 li span { color: #475467; }
.prs7 .ent { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: #101828; color: #98a2b3; }
.prs7 .ent b { color: #fff; } .prs7 .ent p { margin: 2px 0 0; }
.prs7 .ent a { justify-self: start; padding: 9px 14px; border-radius: 8px; background: #fff; color: #101828; font-weight: 700; text-decoration: none; white-space: nowrap; }
.prs7 a:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }
@container (min-width: 440px) { .prs7 .ent { grid-template-columns: 1fr auto; align-items: center; } }

About these CSS Pricing Sections

Prices are text

Write prices as real text with their period (per month, per year) so they can be read, copied and translated. Do not show the price only inside an image.

Say which plan you recommend

A Most popular label in words tells everyone which plan you suggest; a coloured border alone does not. Keep it to one plan.

Billing switches are switches

A monthly and yearly toggle is a role="switch" button with aria-checked, or a pair of radio buttons. Show the saving next to it so the choice is easy.

Answer doubts on the page

The last objections are usually about billing: changing plans, refunds, taxes. Put short answers right under the plans instead of sending people to another page.

Frequently asked questions

How is this different from the pricing tables collection?

Pricing tables focuses on the cards; this collection covers whole sections around them.

Should prices include tax?

Follow your market's rules and say clearly whether tax is included.

Is the estimator accurate?

It uses example rates; replace the formula with your own pricing.