How to jump another part of the document in the same page?

 Posted by Pgayath on 9/21/2012 | Category: HTML 5 Interview questions | Views: 1240 | Points: 40

href and name attribute in the <a> anchor tag is used to jump to another part of the document.


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

<h2>Chapter 1</h2>
<p>This is chapter 1</p>

<h2>Chapter 2</h2>
<p>This is chapter 2</p>

<h2>Chapter 3</h2>
<p>This is chapter 3</p>

<h2><a name="C4">Top</a></h2>
<p>This is chapter 4</p>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response