absolute or relative referencing in html

Status
Not open for further replies.

Troubledyouth

In Runtime
Messages
123
how to you do absolute and relative referencing in html(ie getting a picture to load on a page that is saved in a different folder but the folder is just down the file tree a little bit more.
 
You can put the path the the picture in the <img> tag.

For example, my page is in the home directory of the webpage, but my picture is in the images folder, the tag would look like this



You can go in as many directories as you want.
 
I think you can also use:
Code:
<img src="../somefolder/someimage"
The tree for that example is like this:
Code:
somebasefolder
        |
        --somefolder
        |        |
        |        --someimage.jpg
        |
        --folderofhtml
                |
                --the html file you're using.html

The "../" means go back one folder. Test it to make sure, but I think that works.
 
Status
Not open for further replies.
Back
Top Bottom