how to make image responsive in html code example

Example 1: make a background image responsive css

html {
   min-height: 100%;
   background-image: url(image.jpg);
   background-size: cover;
   background-repeat: no-repeat;
   background-position: center center;
}

Example 2: responsive img

.responsive-img {
  max-width:100%;
  display:block;
  height:auto;
}

Example 3: responsive images

<img src="img.png" style="max-width:100%;height:auto;">

Example 4: making image responsive

<p>
  <a href="MY WEBSITE LINK" target="_blank">
    <img src="IMAGE LINK" style='width:100%;' border="0" alt="Null">
  </a>
</p>

Example 5: imagen responsivo

1<img src="img-mobile.jpg" 2     srcset="img-mobileHD.jpg 2x, 3             img-tablet.jpg 768w, 4             img-tabletHD.jpg 768w 2x, 5             img-large.jpg 1200w, 6             img-largeHD.jpg 1200w 2x" />

Tags:

Html Example