what is the purpose of <IMG> tag. Mention its any two attributes along with their purpose
Answers
Answered by
79
The <img> tag defines an image in an HTML page.
The <img> tag has two required attributes: src and alt.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.
The <img> tag has two required attributes: src and alt.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.
BoyWhoCode:
bhai yaar...ek baar question phir se puch uspe dunga
Answered by
34
Here is a short note on IMG tag in HTML:
(1) It is used to insert images into a document/page.
(2) It is an empty tag.
(3) It has two attributes :
(i) src --------- It specifies the URL of an image.
(ii) alt -------- Provides alternate text in place of the image, if the image cannot be displayed.
Syntax:
<img src="C:\img.jpg" alt='Flower" >
Hope this helps!
(1) It is used to insert images into a document/page.
(2) It is an empty tag.
(3) It has two attributes :
(i) src --------- It specifies the URL of an image.
(ii) alt -------- Provides alternate text in place of the image, if the image cannot be displayed.
Syntax:
<img src="C:\img.jpg" alt='Flower" >
Hope this helps!
Similar questions