A. The card-title class is invalid and should be removed.
B. The card class must be applied to the image, not the div.
C. The card-text class should be on the div, not the paragraph.
D. The image should be placed before the card body inside the card.
Solution
Step 1: Review Bootstrap card image placement
Bootstrap expects the image with card-img-top to be placed before the card body for correct layout.
Step 2: Check other classes usage
The card-title and card-text classes are correctly used on heading and paragraph respectively.
Final Answer:
The image should be placed before the card body inside the card. -> Option D
Quick Check:
Image placement before body = B [OK]
Hint: Place .card-img-top before .card-body inside .card [OK]
Common Mistakes:
Putting image after card body breaks layout
Removing valid card-title or card-text classes
Misapplying card class to image
5. You want to create a responsive Bootstrap card layout that shows three cards side by side on large screens but stacks them vertically on small screens. Which Bootstrap classes should you use to organize the cards correctly?
hard
A. Use grid with three col-4 col-12 cards inside.
B. Use container with three card-lg-4 card-12 inside.
C. Use row with three col-lg-4 col-12 cards inside.
D. Use flex-row with three card-4 card-12 inside.
Solution
Step 1: Understand Bootstrap grid for responsiveness
Bootstrap uses row and col-* classes to create responsive layouts.
Step 2: Choose correct column classes for screen sizes
col-lg-4 makes each card take 1/3 width on large screens, and col-12 makes them full width on small screens, stacking vertically.
Final Answer:
Use row with three col-lg-4 col-12 cards inside. -> Option C
Quick Check:
Responsive columns use col-lg-4 and col-12 inside row = D [OK]
Hint: Combine row with col-lg-4 and col-12 for responsive cards [OK]
Common Mistakes:
Using incorrect class names like card-lg-4
Confusing flex-row with Bootstrap grid row
Using grid without proper Bootstrap classes
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.