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 referrerpolicy Attribute value (strict-origin ) with < iframe > tag in HTML ? with example

Difference between Public vs Internal vs Private state variables in solidity programming langauge with example ?

Why TD is used in HTML?

How to use comments in Solidity programming language ?