|
|
|
Types of Hyperlinking in HTML |
Linking to external web page:
Linking to external web page refers to linking one web page to another through some hypertext. Simply, a page referring to an external page. This inturn can be done in two ways.
1. Linking to a web page which usually takes to the beginning of a web page.
Example:
Note: Clicking on the following link will take you to the main page of hyperlinking.
External Hyperlinking
Code:
<a href="html_hyperlink.php"> External Hyperlinking</a>
2. Some times it may be necessary to jump to a particular location in the target page. This can be done in the following way.
a. Identify the location in the target page where to jump and using the name attribute of <a> tag, give it a name.
For example, <a name="targetloc">
b. In the first page, from where we are providing a link, along with the target page write the name of the target location concatenated with a '#' as follows.
<a href="targetPage.html#targetloc">...</a>
Linking within the same web page:
Some times it may be required to jump to a particular location in the same web page. This can be done as below.
1. Identify the name of the location by giving name to the <a>
For example, <a name="targetloc">
2. In the position from where to jump, just mention the target location as below.
<a href="#targetloc">...</a>
Note: # symbol indicates that a jump is required with in the same document.
More details on linking different parts within a page with back to top code
| |
| Subscribe |
|
Submit your email address and receive
article and product notifications. Your email is safe with us.
|
|
|
|
|
|