0
0
Bootsrapmarkup~5 mins

Figure component in Bootsrap - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the Bootstrap figure component?
The Bootstrap figure component is used to display images with optional captions in a clean, semantic way. It groups an image and its caption together for better structure and styling.
Click to reveal answer
beginner
Which Bootstrap class is used to style the caption text inside a <code>figure</code>?
The class figure-caption is used to style the caption text inside a figure component.
Click to reveal answer
beginner
How do you make a responsive image inside a Bootstrap figure?
Add the Bootstrap class img-fluid to the <img> tag inside the figure. This makes the image scale nicely on different screen sizes.
Click to reveal answer
beginner
Write the basic HTML structure of a Bootstrap figure with an image and a caption.
Use this structure: <figure class="figure"> <img src="image.jpg" class="figure-img img-fluid rounded" alt="Description"> <figcaption class="figure-caption">Caption text here.</figcaption> </figure>
Click to reveal answer
beginner
Why should you always include the alt attribute on images inside a figure?
The alt attribute provides alternative text for screen readers and helps with accessibility. It describes the image content for users who cannot see it.
Click to reveal answer
Which HTML element is used to group an image and its caption in Bootstrap's figure component?
A&lt;div&gt;
B&lt;section&gt;
C&lt;figure&gt;
D&lt;article&gt;
What class should you add to an image inside a figure to make it responsive in Bootstrap?
Aimg-responsive
Bimg-rounded
Cimg-thumbnail
Dimg-fluid
Which class styles the caption text inside a Bootstrap figure?
Acaption-text
Bfigure-caption
Cimg-caption
Dtext-caption
What is the correct way to add a caption inside a figure?
A&lt;figcaption&gt;Caption&lt;/figcaption&gt;
B&lt;div class='caption'&gt;Caption&lt;/div&gt;
C&lt;caption&gt;Caption&lt;/caption&gt;
D&lt;p class='caption'&gt;Caption&lt;/p&gt;
Why is it important to include the alt attribute on images?
AFor accessibility and screen readers
BTo add a tooltip
CFor SEO only
DTo change image size
Explain how to create a Bootstrap figure component with an image and caption that works well on all screen sizes.
Think about grouping, responsive images, and caption styling.
You got /4 concepts.
    Describe why semantic HTML elements like figure and figcaption are important in web development.
    Consider how these elements help both users and search engines.
    You got /4 concepts.