+ 1
How do i add img
Guys I created the krishna janmashtami code but the photo not available https://code.sololearn.com/WuaG7PtsOn2E/?ref=app
8 Réponses
+ 1
You have to provide a link in the src attribute. For example https://biografieonline.it/img/bio/k/Krishna.jpg.
P.S
Put all your js code in window.onload=function(){} and it will work on mobile too.
+ 6
Your on the right track.
If your html file and image were in the same location then your code would work. But since it is not, you should use an 'absolute URL' which includes the full path to the image on the web.
Like this (example only):
<img src="https://some-website/images/some-image-name.jpg">
+ 4
If your image krishna.jpg is located on your local device, then the sololearn web environment has no access to it. You should store the image on a onedrive account and insert the link to the image in the html.
+ 1
Glad Ekong I edited and maked it right
0
Ok thank u all
0
<img src = "url">
0
<img src = "url">
0
I can see the image pretty well.