HTML <img> Tag

<img src="" alt="Drawing of a city skyline.">

The above example demonstrates usage of the <img> element.

The <img> element represents an image embedded in an HTML document.

The image location is specified with the src attribute. The alt attribute provides equivalent content for those who cannot process images or who have image loading disabled. Therefore, the value of this attribute should describe the image sufficiently so that those who can't view the image, will still understand what it represents.

You can (optionally) specify the image's dimensions using the width and height attributes. For example width="150" height="75".

Note that the <img> element does not have an end tag — only a start tag.

Also see the <map> element for how the <img> element is used in image maps.