adding images to html

Hello guys! In this post I have shared the details about “adding images to html”. Okay, let’s move on to the article.

adding images to html

<img src="image.png" alt="Description for image" width="250" height="250">
<img src="flowers.jpg" alt="flowers">

//Always add the image type (jpg,png, etc) Adding alt text
is also good coding practice :)
<img src="example.png" alt="Text will replace the image if it fails to load.">
<!DOCTYPE html>
<html>
   <head>
      <title>HTML img Tag</title>
   </head>

   <body>
      <img src="/html/images/test.png" alt="Simply Easy Learning" width="200"
         height="80">
   </body>
</html>
The <img> tag will help you add image in html coding... it contains attributes:

1) src -  usage <img src="">, it states the source of the image..
2) alt - usage <img src="" alt=""> it is the alternative text if you image failed to load...

Thank you and HAPPY CODING.
Feel free to give a upvote.. ^^
<html>
  <head>
  </head>
	<body>
  <img src="exampel.end">
    </img>
  </body>
  
  
  </html>

Conclusion

I hope this tutorial helps you to know about “adding images to html”. If you have any questions regarding this tutorial please let us know via the comment section. Share this tutorial with your friends & family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment