+ 2
How do I add an image to my web page if the image is not in the same dir as the html file?
I tried <img src="C:\Documents\...." alt=""/> but it doesn't work. Can someone help me?
3 Respostas
+ 4
Try using the path like so: <img src="images/1.jpg" /> obviously changing the path to your image but make sure to include yourimage.jpg using this approach you can just create a folder in the same directory as your html file and name it images, a tip is not to use file:/// paths because you're most likely to upload your project on a webserver making the path unavailable.
+ 3
For use an absolute path, and local files, you need to prefix it by 'file:///' ( instead the 'http://' ), or simplest use an relative path...
+ 2
you can go back src="../../folder/image.png"
../ means go back one folder