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.

namedlink.html

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.

<html>
  <head>
    <title>Frame Example</title>
  </head>
  <body bgcolor="#cdcdcd;" style="padding: 0;">
  <p style="margin:0;">
    <center><h1 id="hd">Header</h1></center>
    <a href="#ft">Footer</a>
  </p>
  <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>  
  </p>
  </body>
</html>

Output

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