How to link html pages in same or different folders?

user112341 picture user112341 · May 26, 2009 · Viewed 319k times · Source

How can I link to html pages if they are in same or different folders without writing full path?

Answer

AgileJon picture AgileJon · May 26, 2009

Within the same folder, just use the file name:

<a href="thefile.html">my link</a>

Within the parent folder's directory:

<a href="../thefile.html">my link</a>

Within a sub-directory:

<a href="subdir/thefile.html">my link</a>