External and Internal Page Links - Jumping Around the Web

External Page Links - Jumping Around the Web

The basic syntax for an external link is:

<A HREF= "some_place_to_go"> Somewhere </A>

In this case, some_place_to_go is the URL of an external web page and Somewhere is the highlighted text that is clicked on to take you there.

A perfect example of this is seen (or at least should be seen) at the bottom of each of my web pages.

Return to The Manager's guide to HTML

The actual code for this is:

<CENTER>Return to <A HREF=index.html>The Manager's guide to HTML</A></CENTER>

The above is a relative link, meaning that the location is relative to the page you click from. With an absolute location, it doesn't matter what URL you came from because the final location is explicitly spelled out. The same link as above in absolute terms is:

<CENTER>Return to <A HREF=https://members.tripod.com/racerjoe/managers_guide/index.html>The Manager's guide to HTML</A></CENTER>

Either one will get you to the same location and will appear identical to the reader. The pros and cons of each approach will be saved for a later discussion.

Internal Page Links - Jumping Around a Web Page

If you have spent any time at all surfing the web, I'm sure you've run across links that you click on and, instead of taking you to another web page, it jumps you to another location on the same page. Well, here's how you do that.

The same exact principle is used as with an external link. The basic syntax for an external link is:

<A HREF= "some_place_to_go"> Somewhere </A>

In the typical case of an external link, some_place_to_go is an already existing web page. For an anchor, we will mark a place within the current docement to go to. This 'anchor' is created with:

<A NAME="anchor name"> </A>

To link to this anchor the code is very similar to the external link except that a # sign is placed just before the anchor name.

<A HREF= "#anchor name"> Somewhere </A>

Now, when Somewhere is clicked on, the section of the page identified by the anchor name will be the first line of the display window.

NOTE: As an ease of use issue, it is best to have the anchor name placed several lines ABOVE where the actual targeted text is. This way, the text to read is not at the very top of the window but, more comfortably for the reader, somewhere between one fourth and half way down the page.

As a final note, you can link to a separate page with an internal anchor. The code for this is:

<A HREF= "URL_address#anchor name"> Somewhere specific on another page </A>

Well, that's all I can think of for now. Until next time...

Return to The Manager's guide to HTML

Return to Next Time

Return to My homepage


This page has been visited times.