Relative link for the directory above

I have such a file structure

Root
-index.html
-adirectory
 ->fileinthedirectory.html

I would like to create a relative link from fileinthedirectory.htmlto index.html, since there are /index.htmllinks to /adirectory/index.htmlwhich do not exist.

+3
source share
1 answer

To go to one directory, you can use:

 ../index.html

or you can run the slash url to start from the root

 /index.html
+13
source

Source: https://habr.com/ru/post/1784554/


All Articles