Src='././mypic.gif' means that the image is two folders up from the html document that called for it. Src='./mypic.gif' means that the image is in one folder up from the html document that called for it. This can go on down as many layers as necessary. Src='images/mypic.gif' means that the image is one folder down from the html document that called for it. but when you have things in different folders, this is just something you'll have to learn. Study the following until you understand how to construct a proper src. Very possibly the cause of your missing image is an improper relative src. It's all fine and dandy, but just keep in mind that you must tell the browser exactly where to find the image. It's very common to place images in a folder other than where your html doc resides. Ok, Joe, I can do that, but as soon as I put the image into a different folder, I start having troubles. ( Should I use gif or jpg? You might find this interesting.)īefore going on to other possible reasons for your missing image, make sure that you can successfully insert an image as shown above. Wrong extension: src='mypic.jpg' when your image is a gif.Mispelling the image name: src='mypick.gif' or src='my pic.gif' instead of src='mypic.gif'.
As long as everything is in the same folder, things are pretty simple to find. This is the simplest way to insert an image.