Lab
Increase ResponseIntroduction
Responsive Images is more than just making image grow and shrink. It is using the right image for any situation.
Objective
For this lab, you will use responsive image techniques and the files provided, make the right image appear on the web page.
Requirements
Follow the requirement below to update the web page to incorporate the techniques of responsive images.
- Download the Image Response starter files, and make the necessary changes to the
index.html
page, No changes will need to be made to thestyle.css
or to the images. - Using the
srcset
attribute and the provided images, updateheader__image
tag to allow the browser to choose the best available image. - Using the
srcset
andsizes
attributes and the provided images, update thefooter__image
tag to allow the browser to choose the best available image. Note: the image is being displayed at 80% of the viewport width (80vw). - Using the
srcset
attribute and the provided images, to update the<img>
tag inside themain__image
tag to allow the browser to choose the best available image. - Add
<source>
tags withmedia
,sizes
, andsrcset
attributes to themain__image
tag to change the image when certain media conditions are met:- For windows between 768px and 1027px, using the images provided, allow the browser to choose the best available version of the
main-image-portrait
image. Note: this image will be displayed at 50% of the viewport width (50vw). - For windows 1028px or larger, using the images provided, allow the browser to choose the best available verion of the
main-image-square
image. Note: this image will be displayed at 33% of the viewport width (33vw).
- For windows between 768px and 1027px, using the images provided, allow the browser to choose the best available version of the
- Add
<source>
tags withmedia
,sizes
, andsrcset
attributes to themain__image2
tag to add the image when certain media conditions are met:- For windows between 768px and 1027px, using the images provided, allow the browser to choose the best available version of the
main-image-landscape
image. Note: this image will be displayed at 50% of the viewport width (50vw). - For all other conditions, no image should be displayed.
- For windows between 768px and 1027px, using the images provided, allow the browser to choose the best available version of the