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

0

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

Guvekat

4 Answers

New Answer

+4

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"/>

+2

used to insert image

+1

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

+1

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