Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 5: Image Manipulation in HTML!
Instruction
Using the \<img\> Element with srcset and sizes Attributes
The <img>
element can serve different image sizes for various viewport conditions by specifying multiple images in the srcset
attribute. The sizes
attribute allows you to define when each image size should be used based on the viewport width.
Example Code:
<img
src="images/mountains_medium.png"
`alt="mountains"`
srcset="images/mountains_...