Challenge - 5 Problems
Media Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why use media components in Bootstrap?
Which of the following best explains why media components improve web content presentation?
Attempts:
2 left
💡 Hint
Think about how media components help organize images and text together responsively.
✗ Incorrect
Media components in Bootstrap help combine images and text side by side in a way that adjusts smoothly on different devices. This improves readability and visual appeal.
📝 Syntax
intermediate2:00remaining
Identify correct Bootstrap media component syntax
Which option shows the correct HTML structure for a Bootstrap media component with an image on the left and text on the right?
Attempts:
2 left
💡 Hint
Look for the correct Bootstrap classes for spacing and structure.
✗ Incorrect
Option B uses the correct Bootstrap 4 classes: media container, mr-3 for right margin on the image, and media-body for the text content.
❓ rendering
advanced2:00remaining
Visual result of Bootstrap media component
What will you see in the browser when rendering this Bootstrap media component code?
Bootsrap
<div class="media"> <img src="https://via.placeholder.com/64" class="mr-3" alt="Placeholder image"> <div class="media-body"> <h5>Media heading</h5> <p>This is some example text next to the image.</p> </div> </div>
Attempts:
2 left
💡 Hint
Remember how Bootstrap media components align images and text horizontally.
✗ Incorrect
The media component places the image on the left with margin to the right, and the text content flows to the right side horizontally.
❓ selector
advanced2:00remaining
Which CSS selector targets the media body text in Bootstrap?
Given the Bootstrap media component structure, which CSS selector correctly targets the text container inside the media component?
Attempts:
2 left
💡 Hint
Look for the class that wraps the text content inside the media component.
✗ Incorrect
The class media-body is used in Bootstrap to wrap the text content inside a media component.
❓ accessibility
expert2:00remaining
Accessibility best practice for media components
Which practice improves accessibility for images used in Bootstrap media components?
Attempts:
2 left
💡 Hint
Think about how screen readers describe images to users who cannot see them.
✗ Incorrect
Descriptive alt text helps users with screen readers understand the meaning of images, improving accessibility.