Forum Moderators: open

Message Too Old, No Replies

html: link to named anchor

         

yllai

4:06 am on Mar 1, 2005 (gmt 0)

10+ Year Member



how to create a hyperlink that can link to the named anchor in another page?

Example: I have named anchor #ABC in page second_page.html, now I want have a hyperlink in page first_page.html that liked to #ABC at second_page.html.

Can be? Anyone can help?

tedster

4:37 am on Mar 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<a href="second_page.html#ABC">link</a>

<edited to fix typo>

[edited by: tedster at 5:57 am (utc) on Mar. 1, 2005]

yllai

5:08 am on Mar 1, 2005 (gmt 0)

10+ Year Member



how about I'm using php instead of html?

can be <a href="second_pahe.php#ABC"></a>?

i tried but can't get it...any idea?

BonRouge

4:00 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Besides the typo, that should work fine (oh... and the actual text in the link).

Deep_Woods

4:32 pm on Mar 1, 2005 (gmt 0)

10+ Year Member



Here is a snippet of the code...
Place your page name and anchor name in the code and it will work...don't forget to name your anchor on the intended page. good luck

For html
<a href="yourpagename.html#anchorname"/>

For php
<a href="yourpagename.php#anchorname"/>

yllai

1:05 am on Mar 2, 2005 (gmt 0)

10+ Year Member



i get it..thanks all