Responsive Product Cards – Complete HTML & CSS Source Code

Best responsive HTML & CSS product cards with images, titles, features, prices, and buy buttons – perfect for any website layout or UI design.

Product Card Design is a modern and responsive layout used to showcase products on any website. It includes an image, heading, description, features, and price — all neatly arranged inside a single card, making the design both attractive and user-friendly.

This layout is very useful for digital products such as eBooks, AI courses, video bundles, and software tools. At the same time, it can also be used for physical items like fashion products, mobile accessories, or gadgets. Its simple format helps customers view all the important information in one place.

The code is built with HTML and CSS, making it lightweight and responsive. Thanks to flexbox and simple styling, it adjusts perfectly on both mobile and desktop screens. You can easily replace the content and use it on any blog or website instantly.

Table of Contents

How to Install Product Cards:

Follow these steps to add Product Cards to your website. Please read the instructions carefully and copy thede in full. Missing any step may cause it to function incorrectly.

Copy Product Cards HTML code

 <div class="products-container"> 
  
   <!--PRODUCT 1 START-->
  <div class="product-card">
    <!--Image-->
    <div class="product-image">
      <span class="badge">50% OFF</span>
      <img src="image-url" alt="#">
    </div>
    <!--Content-->
    <div class="product-content">
      <h2>Lorem ipsum dolor sit amet</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</p>     
      <!--Features-->
      <ul class="features-list">
      
        
<li>✅ 100% cotton</li>
<li>✅ Comfortable fit</li>
<li>✅ Various colors</li> 
      </ul>   
      <!--Price-->
      <div class="price">
        <span class="current">₹199</span>
        <span class="original">₹399</span>
      </div>   
      <!--Buy Button-->
      <a href="buy-url" class="buy-btn" target="_blank">Buy</a>
    </div>
  </div>
    <!--PRODUCT 1 CLOSE-->


  <!--PRODUCT 2 START-->
  <div class="product-card">
    <!--Image-->
    <div class="product-image">
      <span class="badge">35% OFF</span>
      <img src="image-url" alt="#">
    </div>
    <!--Content-->
    <div class="product-content">
      <h2>Lorem ipsum dolor sit amet</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</p>     
      <!--Features-->
      <ul class="features-list">
      
        
<li>✅ 100% cotton</li>
<li>✅ Comfortable fit</li>
<li>✅ Various colors</li> 
      </ul>   
      <!--Price-->
      <div class="price">
        <span class="current">₹199</span>
        <span class="original">₹399</span>
      </div>   
      <!--Buy Button-->
      <a href="buy-url" class="buy-btn" target="_blank">Buy</a>
    </div>
  </div>
  <!--PRODUCT 2 CLOSE-->
 
</div> 

Follow These Steps to Add Product Details in HTML

  1. Copy HTML Code
  2. Paste your web-page
  3. Add Discount Percentage
  4. Add Product Image
  5. Add Image Alt Text
  6. Add Product Title
  7. Add Product Description
  8. Add Product Features
  9. Add Current Price
  10. Add Original Price
  11. Add Product Buy URL
  12. preview and save it

Copy Product Cards CSS code

 <style>
.products-container{display:flex;flex-wrap:wrap;gap:20px;justify-content:center;font-family:Arial,sans-serif}
.product-card{width:300px;border:1px solid #ddd;border-radius:10px;overflow:hidden;box-shadow:0 0 10px rgba(0,0,0,0.1);background:#fff;display:flex;flex-direction:column}
.product-image{position:relative}
.product-image img{width:100%;height:auto;display:block;object-fit:cover}
.product-content{padding:15px}
.product-content h2{font-size:18px;margin:0 0 8px;color:#000}
.product-content p{font-size:14px;color:#555}
.features-list{font-size:14px;color:#333;margin:10px 0;padding-left:20px}
.price{display:flex;align-items:center;gap:10px;margin:10px 0}
.price .current{color:#2e7d32;font-size:20px;font-weight:bold}
.price .original{text-decoration:line-through;color:#888}
.buy-btn{display:block;text-align:center;padding:10px 0;background:black;color:#fff;font-weight:bold;border-radius:6px;text-decoration:none}
.badge{position:absolute;top:10px;left:10px;background:linear-gradient(135deg,#ffd600 90%,#ffe066 100%);color:#000;font-weight:700;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:9px;text-align:center;line-height:0.8;flex-direction:column;z-index:1;box-shadow:0 4px 8px rgba(250,180,0,0.25);letter-spacing:0.5px;cursor:default}
</style> 

Copy CSS Code: If you only need 1–2 product pages, you can directly use this CSS code on the web page.

For multiple pages or a digital/e-commerce website: Paste this CSS code inside your theme’s <head> section. This way, you won’t need to add it repeatedly on every page.

How to add more Product Cards

Adding more product cards to your website is simple. You just need to duplicate the existing <div class="product-card"> block in your HTML code and then update the content for each new product, such as images, titles, descriptions, features, prices, and buy links. By following this method, you can easily expand your product listing without changing the overall design.

  1. Copy the HTML code.
  2.  <!--PRODUCT 3 START-->
      <div class="product-card">
        <!--Image-->
        <div class="product-image">
          <span class="badge">15% OFF</span>
          <img src="image-url" alt="#">
        </div>
        <!--Content-->
        <div class="product-content">
          <h2>product tittle</h2>
          <p>product description.</p>     
          <!--Features-->
          <ul class="features-list">
          
            
    <li>✅ features 1</li>
    <li>✅ features 2</li>
    <li>✅ features 3</li> 
          </ul>   
          <!--Price-->
          <div class="price">
            <span class="current">₹75</span>
            <span class="original">₹100</span>
          </div>   
          <!--Buy Button-->
          <a href="buy-url" class="buy-btn" target="_blank">Buy</a>
        </div>
      </div>
        <!--PRODUCT 3 CLOSE--> 
  3. Replace all details such as discount percentage, product image, image alt text, title, description, features, price, and buy link.
  4. Paste this code between the following lines in your HTML file:
    <!--PRODUCT 2 CLOSE-->
    
    </div>
  5. Save the file and preview it on your website to ensure everything is displayed correctly.

Product Cards FAQ

What is a product card design?

A product card design is a modern and responsive layout that showcases products with images, titles, descriptions, features, and pricing neatly organized in a single card format.

How can I add product cards to my website?

You can add product cards by copying the provided HTML code into your webpage and applying the CSS code. Replace the placeholders with your product images, descriptions, prices, and links.

Can product cards be used for both digital and physical products?

Yes, product cards are versatile and can be used for digital products like eBooks, AI courses, and software, as well as physical items like clothing, accessories, and gadgets.

Are product cards mobile-friendly?

Yes, the product cards use responsive HTML and CSS with flexbox layout, making them automatically adjust to different screen sizes, ensuring a smooth experience on both desktop and mobile devices.

Do I need coding skills to use product cards?

Basic knowledge of HTML and CSS is helpful, but you can easily copy and paste the code provided in the article, replacing placeholders with your own product information without advanced coding skills.

Related Posts

Final Thought:

Product Card Design is a modern, attractive, and fully responsive solution that showcases your products professionally. Whether you are selling digital products or physical items, this layout enhances the customer experience and presents all essential information neatly in a single card.

With easy-to-use HTML and CSS, you can instantly implement it on your website or blog, making your product listings visually appealing and user-friendly.

Post a Comment