Grokking CSS for Web Development
0% completed
Responsive Images
On a phone 375 pixels wide, the flexible image from the previous lesson is drawn 283 pixels wide, yet the browser still downloads the whole 800-pixel file. CSS decides how large an image is drawn, but it cannot decide which file is downloaded. That choice is made in the HTML, with two attributes of the <img> element and one wrapper element. Together they are called responsive images.
Why the File Matters
A photo 800 pixels wide has four times as many pixels as the same photo 400 pixels wide, and its file is several times larger
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%