Asked by Harpreet · · 1 answer

The HTML <img> tag is used to embed an image in a web page. The <img> tag is empty, it contains attributes only, and does not have a closing tag. Example

<!DOCTYPE html>
      <title>HTML img Tag</title>

      <img src="/html/images/test.png" alt="Simply Easy Learning" width="200" 

<img src="" alt="HTML" width="200" height="80">

The src attribute is used to add the image source i.e. URL of the image. The alt attribute is for adding alternate text, width for adding width, and height for adding the height of the image.