Computer Science, asked by abhishek515, 1 year ago

what is the purpose of <IMG> tag. Mention its any two attributes along with their purpose

Answers

Answered by Himanshukajaria
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.

BoyWhoCode: bhai yaar...ek baar question phir se puch uspe dunga
Himanshukajaria: hope now its helpful
abhishek515: bej na yrr
abhishek515: thanx
BoyWhoCode: bhai sun ...isme ese hi sta deta hu ruk
BoyWhoCode: bheju?
abhishek515: bej
BoyWhoCode: Hindi m?
abhishek515: english me
BoyWhoCode: ohk....
Answered by siddhartharao77
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!

abhishek515: ohh
BoyWhoCode: yes...lekin tu ye ku keh raha tha ki abe m abhishek hu Abhishek hu
BoyWhoCode: merko jaanta h kya tu?
siddhartharao77: Now, Please stop chatting here. This is not the place to chat.
BoyWhoCode: ohk...
abhishek515: tu kon hai be
BoyWhoCode: bhai tu msg m baat kar
abhishek515: me majak kar rha tha
BoyWhoCode: ohk
abhishek515: ok
Similar questions