Pricing Table

<!DOCTYPE html>
<html>
<head>
  <style>
body {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  padding: 40px;
}
.plan {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 200px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.plan h3 {
  margin-bottom: 10px;
}
.plan p {
  color: gray;
}
.plan button {
  margin-top: 15px;
  background: green;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.plan button:hover {
  background: darkgreen;
}
</style> </head> <body> <div class="plan">
&lt;h3&gt;Basic&lt;/h3&gt;
&lt;p&gt;$9/month&lt;/p&gt;
&lt;button&gt;Buy&lt;/button&gt;
</div> <div class="plan">
&lt;h3&gt;Pro&lt;/h3&gt;
&lt;p&gt;$19/month&lt;/p&gt;
&lt;button&gt;Buy&lt;/button&gt;
</div> <div class="plan">
&lt;h3&gt;Premium&lt;/h3&gt;
&lt;p&gt;$29/month&lt;/p&gt;
&lt;button&gt;Buy&lt;/button&gt;
</div> </body> </html>

Explanation:

  • Cards aligned with flexbox.
  • Each plan is a styled box.
  • hover makes buttons interactive.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *