Edit This Code:
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../lib/w3.css">
<body class="w3-container">

<h2>Alert as a Card</h2>
<p>Use the <strong>w3-card</strong> classes to display the alert as a card:</p>

<div class="w3-container w3-section w3-red w3-card-2">
  <p>w3-card-2</p>
</div>

<div class="w3-container w3-section w3-red w3-card-4">
  <p>w3-card-4</p>
</div>

<div class="w3-container w3-section w3-red w3-card-8">
  <p>w3-card-8</p>
</div>

<div class="w3-container w3-section w3-red w3-card-16">
  <p>w3-card-16</p>
</div>

<div class="w3-container w3-section w3-red w3-card-24">
  <p>w3-card-24</p>
</div>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy