Linking to a New Page Within Your Website
As we get into more advanced web design, we will all most likely want to add various pages to our websites, in addition to the home pages we have already set up. By linking from a page within your website to another page within your website, you are using relative links.
For example, you may want to link to an “assignments” page from the home page for in-class writing and other posts. In order to fashion another page in your website, you must create another html file apart from your home page’s file (index.html). Using the example that I have started above, we’ll call the file assignments.html. Though this post will not cover how to make the file, it will cover the procedure to follow to make sure you have a way to travel from your home page to the “assignments” page. Once you have the assignments.html file made and formatted it in the way you want, you must upload it in the same way that you uploaded index.html.
Normally, when you link to a page that isn’t your home page, you need to include the whole URL in the within the tag. For example, you might want to link to our class schedule. To do so, you would type <a href=”http://composingdigitalmedia.org/nmrs/schedule.html”>Class Schedule</a> . However, this only applies to external links. When linking within the same website, you do not need to include the whole web address. Instead, just type the name of the file you are looking for. When you are inserting a link to your “assignments page”, your html document should look like something like this:
BE SURE that you name your file the same thing as you type, otherwise you won’t be able to access it! The display text can say whatever you want, though!
Your home page will now look like this:
As long as you have also uploaded your assignments.html file, you can click the link and you’ll be directed there.
For more information on relative links, look to page 51 in Felke-Morris’ Web Development and Design Foundations.