Home | Site Navigation | Internal Page Navigation | No-Follow | Images
Styles | New Window | | Privacy | Purchase Book on HTML

Linking for On-Site Navigation

Besides linking to other websites, you may wish to link to other pages on the same website. When you do this you can use relative links. A relative link is one that instructs the browser to look for the destination based on the current web page. To do this, only as much of the destination address needs to be included in the anchor tag as is absolutely necessary. For example:

<a href="destination.htm">Destination Point</a>.

This code will instruct the browser to take the visitor to another page named "destination.htm" in the same directory as the current page. Note the absence of "http://www.domain.com". To get to a higher level directory begin the destination address with ../, like this:

<a href="../destination.htm">Destination Point</a>.

To go even higher, simply use additional ../s. To get to a lower level directory from the current directory simply include the directory name, followed by the file name, like this:

<a href="lowerdirectory/destination.htm">Lower Directory Destination Point</a>.

Using this method any file on the website can be accessed. Used for internal navigation it can be handy. However, it can lead to complications when using SSI (Server Side Includes) or any other system where code might be used in more than one directory on a website. A relative anchor tag will only call up the correct link when it is called from a specific directory. Also, this method does not work for accessing files between a domain and a subdomain. It is good to know that a standard "absolute" anchor tag (including the "http://www.domain.com") will work in all of these situations.

Creating a linking structure for a website is largely a matter of personal preference. However, there are a few strictures that should be kept in mind. First, many search engines do NOT follow links that are created using Java Script. This means the website designer should be sure to "hard code" links to every page he wants indexed. Second, there should be a logical flow to the information and thus the linking structure. This site is structured with a nav-bar at the top of the page and a sequence of links at the bottom of each page. This allows visitors to read through the site logically or to drill down to specific topics of interest. Thus, each page serves varied interests simultaneously. Finally, linking structures can affect the way search engines see the website. Websites that are disjointed will not be well indexed. The page most often linked to on the website will usually be seen as the most important page.

Use of rel-nofollow (explained in more depth later) can also affect the way search engines see the website. As it tells search engine "bots" not to follow the link, it is best to use this relational attribute for unimportant pages, thereby increasing the importance of the other pages.

In the final analysis, linking, in the context of site navigation, is as simple as using common sense to establish a clear route through the website. But for longer pages you will also want to know how to send your reader to various places on a page. How to do this will be explained in detail on our next page: Anchors on the Same Page.

Contact Us