Challenge - 5 Problems
Responsive Image Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What does the
img-fluid class do in Bootstrap?In Bootstrap, what is the main effect of adding the
img-fluid class to an <img> element?Attempts:
2 left
💡 Hint
Think about how images behave when the screen size changes.
✗ Incorrect
The
img-fluid class applies max-width: 100% and height: auto styles, so the image resizes to fit its container while keeping its original shape.📝 Syntax
intermediate2:00remaining
Which Bootstrap class makes an image rounded and responsive?
You want an image that is both responsive and has rounded corners using Bootstrap classes. Which option correctly applies both?
Attempts:
2 left
💡 Hint
Check Bootstrap 5 class names for responsiveness and rounding.
✗ Incorrect
In Bootstrap 5,
img-fluid makes images responsive and rounded adds rounded corners. Other classes like img-responsive or img-rounded are from older versions or invalid.❓ rendering
advanced2:00remaining
What will be the visual result of this Bootstrap image code on a small screen?
Consider this HTML snippet:
What will the image look like on a small mobile screen?
<img src="landscape.jpg" class="img-fluid rounded-circle" alt="Landscape">
What will the image look like on a small mobile screen?
Bootsrap
<img src="landscape.jpg" class="img-fluid rounded-circle" alt="Landscape">
Attempts:
2 left
💡 Hint
Think about what
img-fluid and rounded-circle do together.✗ Incorrect
img-fluid makes the image scale responsively to the container width, and rounded-circle makes the image appear circular by rounding corners fully. So on small screens, the image shrinks but stays circular.❓ selector
advanced2:00remaining
Which CSS selector targets only responsive images with rounded corners in Bootstrap?
You want to write custom CSS that styles only images that have both
img-fluid and rounded classes in Bootstrap. Which selector is correct?Attempts:
2 left
💡 Hint
Remember how to select elements with multiple classes.
✗ Incorrect
The selector
img.img-fluid.rounded selects <img> elements that have both classes img-fluid and rounded. Other options select descendants or separate classes incorrectly.❓ accessibility
expert2:00remaining
What is the best practice for accessible responsive images in Bootstrap?
You have a responsive image using Bootstrap's
img-fluid class. Which practice improves accessibility the most?Bootsrap
<img src="logo.png" class="img-fluid" alt="Company logo">
Attempts:
2 left
💡 Hint
Think about how screen readers understand images.
✗ Incorrect
The
alt attribute provides text alternatives for images. Meaningful alt text helps users who rely on screen readers understand the image content. Empty alt is only for purely decorative images.