---
title: "How to show the cards on the webpage using CSS3?"  
description: "You can learn to create and show the cards on the webpage using CSS3. A complete guide is given here."  
author: "Ashutosh Patel"  
published: 2024-06-07  
updated: 2024-06-07  
canonical: https://www.mindstick.com/blog/304329/how-to-show-the-cards-on-the-webpage-using-css3  
category: "css-css3"  
tags: ["css-css3", "css", "css styling", "css card"]  
reading_time: 2 minutes  

---

# How to show the cards on the webpage using CSS3?

### Show Cards using CSS3

To display the cards on a webpage using **[CSS3](https://www.mindstick.com/articles/1534/stylish-css3-progress-bars)** involves styling [HTML elements](https://www.mindstick.com/forum/158688/how-can-you-dynamically-create-html-elements-using-jquery) to create a card-like look

## Example-

Here is the basic example of how to display the card on the webpage using CSS3

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Display Card Example</title>
<style>
  /* Styling for card */
  .card {
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: auto;
  }
/* styling for image */
  .card img {
    width: 100%;
    height: auto;
    display: block;
  }

  .card-content {
    padding: 20px;
  }

  .card-content h3 {
    margin-top: 0;
  }

  .card-content p {
    margin-bottom: 20px;
  }
	/* Styling for button displayed on the card */
  .card-content a {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 3px;
  }
    /* Center the heading */
    .headting-text{
    display: flex;
    justify-content: center;
  }
</style>
</head>
<body>

  <div class="headting-text">
    <h1>Here is display a card using CSS</h1>
  </div>

<!-- HTML for design the card -->
  <div class="card">
    <img src="nature-img.jpg" alt="Example Image">
    <div class="card-content">
      <h3>Title</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget felis nec odio vestibulum fringilla.</p>
      <a href="#">Read More</a>
    </div>
  </div>

</body>
</html>
```

## In the example above

- To represent the card [container](https://www.mindstick.com/forum/159610/how-to-connect-a-windows-container-to-a-service-running-on-localhost), we use a `<div>` element of the class called "card".
- In the card container we add an `<img>` element for the card image and a `<div>` element with a class called "**card-[content](https://www.mindstick.com/articles/13019/get-the-best-content-marketing-pricing-packages-for-your-brand)**" that will hold the card's content (**title, text, and button**).
- We create the card using CSS, setting the **width**, **border**, **border**, **[overflow](https://www.mindstick.com/interview/1711/what-is-overflow-properties-in-css)**, **[box shadow](https://www.mindstick.com/forum/158673/how-can-you-create-a-box-shadow-effect-using-css)** and **margins** to create a card-like card.
- The `.card img` rule creates the card image so that it is **[responsive](https://www.mindstick.com/forum/12845/how-to-responsive-div-table-struggle-multiple-rows)** in the card.\ The `.card-content` rule sets the card content area with **padding**.
- The new format is applied to the headings, paragraphs, and links within the card text to improve readability and appearance.

## Output-

![How to show the cards on the webpage using CSS3?](https://www.mindstick.com/blogs/3c8e958b-c1aa-40be-80d8-4941c13b25e3/images/a0d96584-d523-41bd-a46f-6e7c9b54372e.png)

You can create [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) cards by duplicating the card HTML layout and adjusting the content and style as needed. Additionally, you can further customize the look of the card by modifying CSS [properties](https://www.mindstick.com/articles/23331/nootropics-7-different-types-and-their-unique-properties) to suit your layout needs.

**Also, Read:** [How to create a loader using CSS?](https://www.mindstick.com/blog/304327/how-to-create-a-loader-using-css)

---

Original Source: https://www.mindstick.com/blog/304329/how-to-show-the-cards-on-the-webpage-using-css3

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
