<img> tag why to use <img src="tree.jpg"alt=""/> | Sololearn: Learn to code for FREE!

+2

<img> tag why to use <img src="tree.jpg"alt=""/>

<html> <head> <title>first page</title> </head> <body> <img src="tree.jpg" alt="" /> </body> </html>

12/18/2017 3:17:33 PM

rajmit kevadiya

3 Answers

New Answer

+3

The src attribute specifies source of the file.The required alt attribute specifies an alternate text for an image, if the image cannot be displayed

+3

This tag is used to insert an image, and this code is used as an example from sololearn, in general use the following syntax : <img src = "Your image" alt = "Image" /> "alt" this is alternative text for browser Well that's it! that's it, good luck to you :)

+1

We have to use SRC attribute inside the <img> tag to specify the location of the image in an HTML document. It can be any valid URL pointing to an image.