0
0
Bootsrapmarkup~20 mins

Why media components enhance content in Bootsrap - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Media Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why use media components in Bootstrap?
Which of the following best explains why media components improve web content presentation?
AThey force all media to be displayed in a fixed size regardless of device.
BThey automatically compress images to reduce page load time without any coding.
CThey allow combining images and text in a flexible layout that adapts well to different screen sizes.
DThey replace all text content with icons for a cleaner look.
Attempts:
2 left
💡 Hint
Think about how media components help organize images and text together responsively.
📝 Syntax
intermediate
2: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?
A
<div class="media">
  <div class="media-body">
    <h5>Title</h5>
    <p>Some text here.</p>
  </div>
  <img src="img.jpg" alt="..." class="ml-3">
</div>
B
<div class="media">
  <img src="img.jpg" class="mr-3" alt="...">
  <div class="media-body">
    <h5>Title</h5>
    <p>Some text here.</p>
  </div>
</div>
C
<div class="media">
  <img src="img.jpg" alt="...">
  <p>Some text here.</p>
</div>
D
<div class="media">
  <img src="img.jpg" class="media-left" alt="...">
  <div class="media-text">
    <h5>Title</h5>
    <p>Some text here.</p>
  </div>
</div>
Attempts:
2 left
💡 Hint
Look for the correct Bootstrap classes for spacing and structure.
rendering
advanced
2: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>
AThe image appears on the right side with text aligned to the left.
BThe image appears above the heading and paragraph, all centered horizontally.
CThe image is hidden and only the heading and paragraph are visible.
DA small square image on the left with a heading and paragraph text aligned to the right of the image.
Attempts:
2 left
💡 Hint
Remember how Bootstrap media components align images and text horizontally.
selector
advanced
2: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?
A.media-body
B.media > img
C.media-text
D.media img
Attempts:
2 left
💡 Hint
Look for the class that wraps the text content inside the media component.
accessibility
expert
2:00remaining
Accessibility best practice for media components
Which practice improves accessibility for images used in Bootstrap media components?
AAlways include descriptive alt text for images to help screen readers understand the content.
BUse empty alt attributes (<code>alt=""</code>) for all images to avoid distraction.
CAvoid using alt attributes because they slow down page loading.
DUse only decorative images without any alt text to keep the page simple.
Attempts:
2 left
💡 Hint
Think about how screen readers describe images to users who cannot see them.