-
The
pictureelement contains zero or moresourceelements and oneimgelement to offer alternative versions of an image for different display/device scenarios -
The browser will consider each child
sourceelement and choose the best match among them -
If no matches are found—or the browser doesn't support the
pictureelement—the URL of theimgelement'ssrcattribute is selected -
The selected image is then presented in the space occupied by the
imgelement -
The
imgelement must be present, and should appear last ( after the finalsourceelement) -
The image defined in a matching source element is substituted into the
srcattribute of theimgelement -
The
pictureelement itself does not display anything; it merely provides a context for its containedimgelement that enables it to choose from multiple URLs widthandheightare defined by theimgelement values