How do you give an < image > a tag?

 How do you give an < image > a tag?


To use an image on a webpage, use the <img> tag. The tag allows you to add image source, alt, width, height, etc. The src is to add the image URL. The alt is the alternate text attribute, which is text that is visible when the image fails to load.

Note: This will only work on your local system since the path is your local drive.


How to use < img > tag in HTML

<html>

   <head>

      <title>

         HTML img tag

      <title>

   </head>


   <body>

      <img src="file:/D:/images/logo.png" 

alt="Site Cover Image" width="50" height="50">

   </body>

</html>

Comments

Last 7 Days

How to use sandbox attribute value ( allow-top-navigation) with < iframe > tag in HTML ? with example

What is img scr or image scr or scr img ?