Lebada Petru
Lebada Petru

Reputation: 37

How to set the path of a hyperlink from a subfolder to the main folder?

This may sound lame but I really can't find it and its also hard to explain it, but I'll do my best. So, for example I have an index and in that index a navigation bar. And I want to set the path from a html file which is in a subfolder into a main folder.

 <a href="index3.html"> 

It is easy if you want to set the path for a file to another file if they are in the same folder. But if I want to set the path from a subfolder to the main folder what's the trick?

Upvotes: 0

Views: 334

Answers (1)

RobRichard
RobRichard

Reputation: 100

Use the "../" notation to navigate to the parent folder. So for example, if in the child folder and page you have a link to the parent index.html page, it would look like:

<a href="../index.html">

Upvotes: 1

Related Questions