October 22, 2011
Linking to another Page within your Website
To link to another page within your website, there’s no need to insert the pound sign (#) before the file’s path, instead just place the filename and the appropriate file extension as the value of the hypertext reference (href). This method is applicable only if both webpages, the current page and the file to be linked to, is within the same folder. As shown in the right.
If you are creating a link on page1.html and you want to link on page3.html, make sure to include the directory or folder where page3.html is located, see the folder-file structure on the right side.
What if you are on page3.html and you want to create a link which will lead back to page1.html, what would be the value of href? Tricky eh? You have to tell the browser to go up one level in order to get page1.html. In this situation use the code below:
<a href=”../page1.html”>Page 1</a>