The following code shows an example of Creating Named Links in HTML. Basically, we use a named link or named anchor to move to another part of the same web page.


As can be seen, the paragraph where you want to jump must have an id attribute with a given value. Further, the href attribute must have the same value as above id preceded by a # symbol. For examle, if the paragraph has following value for id,

<p id="abc">....</p>

The corresponding href attribute in the anchor tag must have following value.

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

The following code demonstrates it.

    <title>Frame Example</title>
  <body bgcolor="#cdcdcd;" style="padding: 0;">
  <p style="margin:0;">
    <center><h1 id="hd">Header</h1></center>
    <a href="#ft">Footer</a>
  <p style="height: 1000px;margin:0;"></p>
  <p style="height: 150px;margin:0;">
    <center><h2 id="ft">Footer</h2></center>
    <a href="#hd">Header</a>  


Example of Creating Named Links in HTML
Example of Creating Named Links in HTML