Pages

Sunday, August 7, 2022

Jumplink Codes

Jump or anchor links refer to links that, when clicked on, carry visitors to a destination that is on a different part of the same page. For instance, if you are reading the 2nd of a 100-paragraph document, you may jump ahead to the 77th paragraph from the 2nd by clicking on such a link. However, in order to make this possible, you need to first create an anchor, ie the destination's landmark on which you will land when you click on the link. 


This short post illustrates to 2 steps for setting up this type of facility. The first step involves creating the tagname aka 'ID' for anchor. The ID is a code. For instance, if the post is about gardening and the anchor is about tropical plants, your ID might be "tropical". You will need to place this code immediately above the destination. Commonly, this is the line above the destination, like the line above the heading 'Tropical plants'. The second step involves creating the link that visitors can use to access the location. This post assumes that you already know the basics and how to access the HTML coding for the pages on which you are working. 


1. Enter this code <div id="  "></div> at the target point of your document. 

Example: 

<div id="tagname"></div>


2. Create a hyperlink at your point of origin.

 <a href="#      ">                     </a>

Example:  <a href="#tagname">text of link</a>


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.