Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Responsive Images!
You have completed Responsive Images!
Preview
Using srcset, we can provide multiple image sources for different responsive resolutions and pixel densities. In this video, we'll learn how to implement the srcset attribute in Workspaces.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
network documentation for the source set
attribute.
0:00
You can find a link to the MDN docs in the
notes associated with this video.
0:00
So, here I have the Mozilla Developer
Network documentation open.
0:05
And you'll see that we have this srcset
attribute here.
0:12
And right here, it says this is a list of
one or more strings separated by commas,
0:16
indicating a set of possible images for
the user agent to use.
0:22
Each string is composed of a URL to the
image, and
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up