6.3 Homework/Practice
Create a Card Layout Using the Box Model
// Some code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Card Layout</title>
<!-- External CSS file -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<!-- Card 1 -->
<div class="card">
<h2>Card 1</h2>
<img src="https://via.placeholder.com/250" alt="Sample Image 1">
<p>This is a description for Card 1. It includes an image, heading, and text inside a styled box.</p>
</div>
<!-- Card 2 -->
<div class="card">
<h2>Card 2</h2>
<img src="https://via.placeholder.com/250" alt="Sample Image 2">
<p>This is a description for Card 2. It includes an image, heading, and text inside a styled box.</p>
</div>
<!-- Card 3 -->
<div class="card">
<h2>Card 3</h2>
<img src="https://via.placeholder.com/250" alt="Sample Image 3">
<p>This is a description for Card 3. It includes an image, heading, and text inside a styled box.</p>
</div>
</div>
</body>
</html>

Last updated