Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Intro to HTML & CSS) expand_more
Intro to HTML & CSS / Layout & Responsive

Responsive images

Learn Responsive images in Intro to HTML & CSS with a focused explanation, a topic-specific example, and a mastery check.

12 min read • Intermediate
intro-html-css-030.html
html
<img src="lake-800.jpg" srcset="lake-480.jpg 480w, lake-800.jpg 800w, lake-1200.jpg 1200w" sizes="(max-width:600px) 100vw, 700px" alt="Blue lake surrounded by hills">
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content