Saturday, January 1, 2011

0

How to link to a location in different page

  • Saturday, January 1, 2011
  • abhi
  • Share
  • 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 http://goo.gl/bB0Iu (permalink shortened using Google URL shortener)

    Thus, I write the hyperlink HTML as

    <a href="http://goo.gl/bB0Iu#linksamepage">some text</a>

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

    Try clicking http://goo.gl/bB0Iu#linksamepage and see where it takes you.

    0 Responses to “How to link to a location in different page”

    Post a Comment

    Subscribe