You are here : htmlHTML 5img

<img> - HTML 5

The <img> tag defines an image in an HTML page.

The <img> tag has two required attributes: src and alt.

Note: Images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.

Tip: To link an image to another document, simply nest the <img> tag inside <a> tags.


Syntax

<img src="smiley.gif" alt="Smiley face" height="42" width="42">


Example

<img src="smiley.gif" alt="Smiley face" height="42" width="42">


Output / Return Value


Limitations


Alternatives / See Also


Reference