How to Create a Simple Pricing Card UI Using HTML & CSS (Perfect for Beginners)
In this step-by-step, beginner-friendly tutorial, you’ll learn how to create a clean and professional pricing card using only HTML and CSS. Even if you consider yourself a total newbie or “dummy,” this guide explains everything gently and clearly.
🧱 Step 1 — Create Your Project Folder
Before we start coding, let’s set up a clean workspace.
✔ Do this:
-
Create a new folder and name it: pricing-card-tutorial
-
Inside it, create two files:
-
index.html -
style.css
-
That’s all — simple and organized.
🧩 Step 2 — Write the HTML Structure
Open index.html and paste the following code:
📝 Explanation for beginners:
-
<div class="card">— this is the main container. -
<h2>— the plan name (e.g., Basic, Premium, Pro). -
.price— the main highlighted price. -
<ul>— list of features included in the plan. -
<button>— call-to-action button.
This is the skeleton of your pricing card.
🎨 Step 3 — Add Styling to the Pricing Card
Now open style.css and add this CSS:
📝 What this CSS does (simple explanation):
-
Centers everything on the screen using flexbox
-
Creates a white card with rounded corners
-
Adds a soft shadow for a professional look
-
Styles the price so it stands out
-
Makes the button feel “clickable” with hover animation
Everything here is modern and clean — just like real pricing pages.
📱 Step 4 — Make the Pricing Card Responsive (Mobile Friendly)
Let’s ensure it still looks good on smaller screens.
Add this at the bottom of style.css:
📝 Explanation:
-
On phones, the card becomes slightly narrower
-
The text scales down to fit nicely
-
Nothing complicated — just a smooth adjustment
🧪 Step 5 — Test Your Pricing Card
Do this:
-
Open your index.html in a browser
-
Try resizing the window
-
The card should shrink smoothly
-
Hover over the button — notice the soft animation
You now have a fully functional and responsive pricing card.
🎁 Bonus Step — Add More Pricing Tiers
If you'd like three cards side by side (like “Basic”, “Pro”, “Premium”), use a wrapper:
And some CSS:
Now ! — instant pricing section!
Creating a clean and responsive pricing card is an excellent beginner project to practice HTML and CSS. In this tutorial, you learned how to structure content, style UI elements, use flexbox for layout, and add responsive design with media queries. This component is perfect for landing pages, SaaS sites, product pages, or personal portfolio projects. With these building blocks, you’re now one step closer to creating full modern websites.