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

11th Sep 2016, 11:33 PM
Guvekat
Guvekat - avatar
4 Answers
+ 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"/>
12th Sep 2016, 12:50 AM
Liam
Liam - avatar
+ 2
used to insert image
12th Sep 2016, 2:38 PM
ayushi
ayushi - avatar
+ 1
Cause browser aren't allowed to access local file system (for security purposes)
12th Sep 2016, 12:32 AM
Aguel Satria Wijaya
Aguel Satria Wijaya - avatar
+ 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
14th Sep 2016, 4:59 AM
pradeep kumar.r
pradeep kumar.r - avatar