Complete the code to add an image to the card.
<div class="card"> <img src="image.jpg" class="card-img-[1]" alt="Sample Image"> <div class="card-body"> <h5 class="card-title">Card title</h5> </div> </div>
The class card-img-top places the image at the top of the card, which is the standard way to add an image in a Bootstrap card.
Complete the code to add a dark overlay on the card image.
<div class="card bg-dark text-white"> <img src="image.jpg" class="card-img" alt="Sample Image"> <div class="card-img-[1]"> <h5 class="card-title">Card title</h5> </div> </div>
The class card-img-overlay creates a layer over the image where you can place text or other content.
Fix the error in the code to properly overlay text on the card image.
<div class="card text-white"> <img src="image.jpg" class="card-img" alt="Sample Image"> <div class="card-img-[1]"> <h5 class="card-title">Overlay Title</h5> </div> </div>
The overlay container must use card-img-overlay to properly place content over the image.
Fill both blanks to create a card with an image overlay and white text.
<div class="card [1]"> <img src="image.jpg" class="card-img" alt="Sample Image"> <div class="card-img-[2]"> <h5 class="card-title">Overlay Text</h5> </div> </div>
The card needs bg-dark text-white classes for a dark background with white text, and card-img-overlay to place the overlay content on the image.
Fill all three blanks to create a card with an image overlay, white text, and a button inside the overlay.
<div class="card [1]"> <img src="image.jpg" class="card-img" alt="Sample Image"> <div class="card-img-[2]"> <h5 class="card-title">Overlay Title</h5> <p class="card-text">Some overlay text.</p> <a href="#" class="btn btn-[3]">Click Me</a> </div> </div>
The card uses bg-dark text-white for dark background and white text, card-img-overlay for the overlay container, and btn-primary for a blue button.