Description
In order to display the images in HTML page we use <img> tag. It is a unpaired tag and requires two attributes which are src and alt.
In src we provide the source url of the image.
In alt we provide some text which is displayed when image fails to display.
Code Example :
<img src="https://common-content.thegyanva.com/images/PostContents/gs650_4.jpg" alt="sample image" />
Output :
Output of broken link (demo of alt attribute) :
This is we use image tag in HTML.