<img>

HTML4 HTML5

Embeds images in an HTML document. Void (self-closing) element that contains no closing tag or inner content.

Closing tag is disallowed.

Attributes:

Example

Code:

<img src="https://picsum.photos/id/1025/300/200" alt="Dog wrapped in a blanket" style="max-width: 100%; height: auto; border-radius: 4px; display: block; margin: 0 auto;">

The browser will interpret this code as follows:

Dog wrapped in a blanket