source - html

Resolution effect will not work in IE browsers

by Santosh Thakur

HTML

<picture>
  <source media="(min-width: 650px)" srcset="https://www.w3schools.com/w3images/lights.jpg">
  <source media="(min-width: 465px)" srcset="https://www.w3schools.com/w3images/nature.jpg">
  <img src="https://www.w3schools.com/w3images/fjords.jpg" alt="Flowers" style="width:auto;">
</picture>

<p>Resize the browser to see different versions of the picture loading at different viewport sizes. The browser looks for the first source element where the media query matches the user's current viewport width, and fetches the image specified in the srcset
  attribute.
</p>