+ 2

How to add image ( HTML)

What happing with code why it don't show image <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <!-->this is name of image--> <img src="./asset/India.jpeg" alt="xmap"/> <br/><br/> <!-->this is the location of image--> <img src="/storage/emulated/0/Download" width="25%" height="25%" alt="ymap"/> </body> </html>

24th Nov 2020, 10:25 PM
Samantha
5 Réponses
+ 9
hey buddy your code is right but a thing that solo leaen doesn't supports the data of local computer. You have give the links from the internet. Cz solo learn code playground never exists any file or folder from your device storage. So the ide doesn't know what is your device. Hope I helped you happy coding.
26th Nov 2020, 5:30 PM
Minhazur Rahaman Ratul
Minhazur Rahaman Ratul - avatar
+ 5
Use dropbox
24th Nov 2020, 11:11 PM
🔥EACY🔥
🔥EACY🔥 - avatar
+ 4
put the img in the same directory of the html file and try again , <img src="india.jpeg" />
24th Nov 2020, 11:10 PM
Med Amine Fh
Med Amine Fh - avatar
+ 3
anju devi Let's say that index.html is in the root directory and my image is in the assets directory like below index.html assets/ |--India.jpg My image tag would then have the following because the paths are relative to the served html file: <img src="./assets/India.jpg"/> If you are asking how to use images in Sololearn, you should check use search bar, or follow my Firebase storage tutorial.
25th Nov 2020, 3:17 AM
Zeke Williams
Zeke Williams - avatar