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


<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


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


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 :)


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.