Cover Image for CSS Pricing Table
181 views

CSS Pricing Table

Creating a CSS pricing table involves HTML for the structure and CSS for styling. Below is a basic example of a simple and responsive pricing table. You can further customize and enhance it according to your needs.

HTML structure:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Pricing Table</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
  <div class="pricing-table">
    <div class="plan">
      <h3>Basic</h3>
      <p class="price">$19.99<span>/month</span></p>
      <ul>
        <li>Feature 1</li>
        <li>Feature 2</li>
        <li>Feature 3</li>
      </ul>
      <a href="#" class="btn">Select Plan</a>
    </div>
    <div class="plan recommended">
      <h3>Pro</h3>
      <p class="price">$29.99<span>/month</span></p>
      <ul>
        <li>Feature 1</li>
        <li>Feature 2</li>
        <li>Feature 3</li>
        <li>Feature 4</li>
      </ul>
      <a href="#" class="btn">Select Plan</a>
    </div>
    <div class="plan">
      <h3>Premium</h3>
      <p class="price">$49.99<span>/month</span></p>
      <ul>
        <li>Feature 1</li>
        <li>Feature 2</li>
        <li>Feature 3</li>
        <li>Feature 4</li>
        <li>Feature 5</li>
      </ul>
      <a href="#" class="btn">Select Plan</a>
    </div>
  </div>
</body>
</html>

CSS (styles.css):

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.pricing-table {
  display: flex;
  justify-content: center;
}

.plan {
  background-color: #f1f1f1;
  text-align: center;
  padding: 20px;
  margin: 10px;
  width: 250px;
  border-radius: 5px;
}

.plan h3 {
  color: #333;
  font-size: 24px;
  margin-top: 0;
}

.price {
  font-size: 36px;
  color: #008cba;
}

.price span {
  font-size: 16px;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  padding: 10px 0;
}

.btn {
  display: block;
  background-color: #008cba;
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 5px;
  margin: 10px auto 0;
  width: 150px;
}

.recommended {
  border: 2px solid #008cba;
}

This is a basic example of a pricing table. You can modify the HTML and CSS code to add more features, styling, and responsiveness as needed.

YOU MAY ALSO LIKE...

The Tech Thunder

The Tech Thunder

The Tech Thunder


COMMENTS