AAn image with rounded corners and a caption below it in smaller italic text.
BAn image with sharp corners and a caption above it in bold text.
COnly a caption text is shown, no image is visible.
DAn image with a border but no caption is displayed.
Attempts:
2 left
💡 Hint
Remember that Bootstrap's figure-caption is styled to appear below the image in smaller italic text.
✗ Incorrect
Bootstrap's figure component wraps an image and a caption. The image uses classes to make it fluid and rounded. The caption appears below the image in smaller italic text by default.
❓ selector
intermediate
1:30remaining
Which CSS selector targets the caption text inside a Bootstrap figure component?
You want to style only the caption text inside a Bootstrap figure component. Which CSS selector will correctly select it?
Afigure .caption-text
B.figure-caption img
C.figure figcaption
D.figure-img figcaption
Attempts:
2 left
💡 Hint
The caption is inside a element that is a child of an element with class 'figure'.
✗ Incorrect
The correct selector is '.figure figcaption' because figcaption is a child element inside the container with class 'figure'. Other options either select wrong elements or use incorrect class names.
🧠 Conceptual
advanced
1:30remaining
What accessibility feature does the element provide in a figure component?
Why is it important to use the element inside a figure component for accessibility?
AIt provides a textual description of the image that screen readers can read aloud.
BIt automatically resizes the image for mobile devices.
CIt adds a decorative border around the image.
DIt hides the image from keyboard navigation.
Attempts:
2 left
💡 Hint
Think about how users who cannot see images understand the content.
✗ Incorrect
The element gives a description or caption for the image, which helps screen readers convey the meaning or context of the image to users with visual impairments.
❓ layout
advanced
2:00remaining
How to align a Bootstrap figure component to the right side of the page?
You want the entire figure component (image and caption) to appear aligned to the right side of the page. Which class or style should you add?
CAdd style "margin-left: auto;" to the <figcaption> element.
DAdd class "d-flex justify-content-center" to the <figure> element.
Attempts:
2 left
💡 Hint
Bootstrap uses float utility classes to float elements left or right.
✗ Incorrect
Adding the class "float-end" to the element floats the entire figure to the right side. "text-end" aligns text inside an element, not the whole figure. The other options do not correctly align the figure to the right.
📝 Syntax
expert
2:00remaining
What error occurs if you omit the alt attribute in the tag inside a figure?
Consider this code snippet inside a Bootstrap figure component:
Image caption
What accessibility or validation issue arises from this?
AThe image will automatically have a default alt text added.
BThe browser throws a syntax error and does not render the image.
CThe caption text will not display under the image.
DThe image is ignored by screen readers, causing accessibility issues.
Attempts:
2 left
💡 Hint
Alt text is important for screen readers to describe images.
✗ Incorrect
Without an alt attribute, screen readers cannot describe the image content, which harms accessibility. Browsers do not throw syntax errors for missing alt, and captions still display. No default alt text is added automatically.