From the course: CSS: Advanced Layouts with Grid
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
What are responsive images? - CSS Tutorial
From the course: CSS: Advanced Layouts with Grid
What are responsive images?
- If you go look at the source code for a webpage that has a lot of images on it, there's a good chance you'll notice that the image elements look something like this, where you have your regular image element attribute's source which points at the original source, and then you have an alt attribute that describes the image if you don't see an image or if you're using a text-to-speech browser. And then you have these new ones; source set, which is a long list of other image names, and then you have sizes which is this weird mix of media queries and some widths. This looks far more complicated than what we used to do, which was just those two first lines here. What's going on? This is what's known as responsive images. It's a spec that's been around on the web for quite a while now. It is a spec that is extremely important, very powerful, and a little bit hard to understand because of the naming conventions and so on. Let me try to explain what's actually happening here and what these…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.