Images
Alt Attribute
The purpose of the alt
attribute is twofold. First, the value of the alt
attribute
will display on the page if the image either fails to load or the end user has images disabled. Second,
the value provides context to assistive technologies (screen readers). The value will be announced when the
screen reader reads through the page, informing the user of its purpose.
ALT attribute mandatory
All instances of the <img>
element must have the alt
attribute defined
to provide context to assistive technologies (screen readers). If the purpose is already conveyed
nearby on the page, use a blank alt tag (alt=""
) to hide the image from screen readers.
Responsive Images
To make images resize to fill the available container width in all screen sizes,
apply the img-responsive
class. When the image is wider than the width available,
it will scale down proportionally to fit.