+ 2
I'm having trouble inserting an image in my HTML code. Can someone help me please?
I don't understand how to insert an image in a HTML code - can someone help please?
5 Answers
+ 4
Complete guide : https://www.w3schools.com/html/html_images.asp
+ 4
<IMG src="image.link.png" />
+ 1
@H Chiang:
my image is saved on my computer and I am testing the code via sololearn
I dont understand brains' answer
could someone give me an example please
- 1
Brains is correct.
But where are you testing your code and where is the image?
E.g.
1. On your own computer (not using SoloLearn)?
2. Via SoloLearn?
...
- 1
SoloLearn cannot see your computer, hence the image tag will not work for you.
If you are viewing it locally (not via SoloLearn or any outside server), then you use the image tag in the body and tell it where the photo is on your system relative to your code.
Most users host images on remote virtual web servers, hence it would be similar to hosting it locally.
But since you donât have a web server you should upload it then point the image tag to it.
My friend host his images on Google and web server separately. Hence he uses the following site:
https://www.labnol.org/internet/embed-google-photos-in-website/29194/