0
0
Bootsrapmarkup~5 mins

Responsive images in Bootsrap - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does it mean for an image to be responsive in web design?
A responsive image automatically adjusts its size to fit the screen or container it is in, so it looks good on all devices like phones, tablets, and desktops.
Click to reveal answer
beginner
Which Bootstrap class makes an image responsive?
The <code>.img-fluid</code> class in Bootstrap makes an image scale nicely to the parent container by setting <code>max-width: 100%</code> and <code>height: auto</code>.
Click to reveal answer
beginner
Why should you use alt attributes with images?
The alt attribute provides alternative text for images. It helps screen readers describe the image to visually impaired users and improves accessibility.
Click to reveal answer
intermediate
How does the srcset attribute help with responsive images?
The srcset attribute lets the browser choose the best image size to load based on the device's screen size and resolution, saving bandwidth and improving load speed.
Click to reveal answer
intermediate
What CSS properties does Bootstrap's <code>.img-fluid</code> class use to make images responsive?
It uses max-width: 100% to limit the image width to its container and height: auto to keep the image's aspect ratio.
Click to reveal answer
Which Bootstrap class should you add to an <img> tag to make it responsive?
A.img-scale
B.img-responsive
C.responsive-img
D.img-fluid
What does the CSS property max-width: 100% do for an image?
APrevents the image from becoming wider than its container
BMakes the image always 100 pixels wide
CSets the image width to 100% of the screen
DFixes the image size regardless of container
Why is it important to include the alt attribute on images?
AIt changes the image size
BIt improves accessibility for screen readers
CIt adds a border around the image
DIt makes the image responsive
What does the srcset attribute do in an <img> tag?
ASpecifies multiple image sources for different screen sizes
BSets the image border style
CDefines the image caption
DAdds a hover effect to the image
If an image has height: auto in CSS, what happens?
AThe image height is fixed and does not change
BThe image height becomes zero
CThe image height adjusts to keep its original proportions
DThe image height doubles
Explain how to make an image responsive using Bootstrap classes and why it is important.
Think about how images behave on phones versus desktops.
You got /4 concepts.
    Describe the role of the alt attribute and the srcset attribute in responsive images.
    One helps people, the other helps devices.
    You got /4 concepts.