I got an error while trying to go back to a root folder (folder A) from child folder (folder B "inside folder A)..
Am just confused, because am trying every way to solve the problem but am still got an error, "File not found…"
This is my code:
<a href="../folder B/folder A/index.html> Home
2
Answers
Assuming the above is your folder structure (as described) and you are going from
page.html
inFolder B
toindex.html
inFolder A
, then you don’t need to explicitly specify the folder name again. The following should be sufficientThe
../index.html
meant, leave current directory (Folder B) and go to the upper directory (Folder A) inside of which you would findindex.html
.Note: A piece of advice is to use lowercase one word (or with underscore or hyphens instead of space) for your folder names in order to avoid issues with deploying on windows and linux system (e.g. foldera, folder-a, folder_a)
fix the "File not found" error when linking from folderB to folderA, use this relative path in your folderB/index.html.
Go to Folder A
This path moves up one level from folderB to folderA. Make sure the file index.html exists in folderA.