How does the <img> tag work? | Sololearn: Learn to code for FREE!


How does the <img> tag work?

I added an image that was in my computer to the folder i created where my html text and page is saved. I want to add the image and i added this <img src="C:\users\katherine\desktop\html\cameralens.jpg"/> It's not working and I don't understand why! :( Someone please help! Thanks

9/11/2016 11:33:37 PM


4 Answers

New Answer


Try <img src="file:///C:\users\katherine\desktop\html\cameralens.jpg"/> If the image is in the same directory as the html then this should work too - <img src="cameralens.jpg"/>


used to insert image


Cause browser aren't allowed to access local file system (for security purposes)


since your image is in same folder of code paste it in desktop and then use the relative path of that image it might work