Computer Science, asked by gogoiparag48, 10 months ago

1.Explain the use of following tags with their attributes.
(a).<img>​

Answers

Answered by vansh932017
0

Answer:

<img> tag is used for image Linking

It's attribute is <img src>

Answered by Brainlyshchay
1

Q) .Explain the use of following tags with their attributes.

(a) <img>

ANS)

<img>

  • <img> tag is used to add a image into your .HTML file.
  • The images added can be taken from internet via entering the link of the image or by adding the image path. Your path will be something like this:  C:\Users\Nishchay\Downloads\Image.png
  • The <img> tag requires two important attributes which are:
  1. src="", which is added like this <img src="link or path">
  2. alt="", which is added like this <img alt="image.png">

Src (source) Attribute:

  • The src or source attribute is used to tell the HTML, from where to take the image or the source of image which is going to be added.

Alt (alternate) Attribute:

  • The alternate attribute is added to the image tag because in case if the image is not loaded the user/person will get confused about the image. So if you are a good web developer, you will add alt attribute to the image.

So your final code should look like this:

<img alt="Alternate text" src="Link or path">

*please also check the photo, it has a example of the code which will help you more

Attachments:
Similar questions