<img> tag why to use <img src="tree.jpg"alt=""/> | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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>

18th Dec 2017, 3:17 PM
rajmit kevadiya
rajmit kevadiya - avatar
3 Answers
+ 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
18th Dec 2017, 3:23 PM
💻Amey💻
💻Amey💻 - avatar
+ 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 :)
18th Dec 2017, 3:25 PM
James16
James16 - avatar
+ 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.
18th Dec 2017, 3:26 PM
Ronak Bothra
Ronak Bothra - avatar