Friday, November 7, 2008

How To Link Different Parts Of Same Web Page [Anchors]

If you want to link within the same the web page, like this:

Target 1 [Click to go to Target 2]

To link within the same web page, use this code:

Use this code to create the clickable link:
<a href="#ANCHOR-TEXT">Linking Text</a>

Use this code in the target area.
<a name="ANCHOR-TEXT"/>

Now whenever a visitor clicks on the hyper linked "Linking text", in the above code
then the visitor will reach the Anchor text code.

Target 2 [Click it to go back to Target 1]

These are called HTML anchors !

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...