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>Image as a Card</h2>
<p>Wrap any of the w3-card-* classes around the image to display it as a card:</p>

<div class="w3-card-4" style="width:50%">
  <img src="img_avatar3.png" alt="Person" style="width:100%">
  <div class="w3-container">
    <h4><b>Simon</b></h4>
    <p>The boss of all bosses</p>
  </div>
</div>
<br>

<p>More shadows:</p>
<div class="w3-card-16" style="width:50%">
  <img src="img_avatar5.png" alt="Person" style="width:100%">
  <div class="w3-container">
    <h4><b>Jane</b></h4>
    <p>The other boss</p>
  </div>
</div><br>

</body>
</html>


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