This is a very basic html question, but I can’t seem to locate the answer.
I have a local file located here:
/Users/Me/Desktop/Main/June/foo.txt
In an .html document located within the /Main directory, I can link to the foo.txt file using the full path:
<a href="file:///Users/Me/Desktop/Main/June/foo.txt">Full Path Link</a>
I would like to use relative paths to link to foo.txt. Does anyone know how to create a relative path link to this foo.txt file?
I tried the code below and a number of similar permutations, but I can’t seem to successfully write the relative path link for this local file.
<a href="file:///../June/foo.txt">Relative path Link</a>
Remove the
file:///part to have just../June/foo.txt.This should help you out.