Saturday, January 01, 2011

How to link to a location in different page

The previous post explain how to link to a location in the same page. In summary, it would be as follows:

The hyperlink HTML is written as

<a href="#key">some text</a>

where key is any text you would like to use as the key, and the location to which you want to link to is preceded by

<a id="key" name="key">>/a>

To link to a location in a different page, it will be almost exactly the same except the #key will now be preceded by the URL of the page to which you want to link to so it now become

<a href="URL#key">some text</a>

For example, the URL of the previous post is (permalink shortened using Google URL shortener)

Thus, I write the hyperlink HTML as

<a href="">some text</a>

As I have used as the key "#linksamepage".

Try clicking and see where it takes you.

No comments:

Post a Comment

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics