Forum Moderators: mack

Message Too Old, No Replies

Create a hyperlink to an exact location on a webpage

How Do I Do This

         

newborn

6:03 pm on Mar 14, 2008 (gmt 0)

10+ Year Member



Hi Guys

I have an index page, index.htm, it has several bookmarks on it along with a link structure that allows browsers to click on the top of the page to find that section.

However, I have page2.htm and would like to create a link from page2.htm to index.htm a specific bookmark location.

I have tried index.htm/#bookmark name

But that does not work. Can someone help me ASAP

NewBorn

Swanny007

6:47 pm on Mar 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



index.htm#bookmark (no slash).

rocknbil

8:12 pm on Mar 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To clarify, what you're looking for is an anchor. The anchor must be named but **should** have an ID. In the above example, the linked-to page must contain this above the bookmarked area:

<a id="bookmark"></a>

The name attribute is also valid, but deprecated:

<a name="bookmark"></a>

You can also use both.

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