Anchor Link for Jumping to a Specific Part of a Page

Ask a question
6

I would like to scroll and skim read easily through a website page easily. Is there any way to do that?

Coin iconoffer bounty
add comment

3 Answers

6

Try to create a hyperlink using the id of the link target, preceded by #.
``<a href="#anchor-name">Jump to the part of the page with “anchor-name” id </a>
add the preferred text, and you will be able to fly through the page sections.

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      .main-content {
      height: 100vh;
      text-align: justify;
      }
    </style>
  </head>
  <body>
    <h2 id="Lorem_Ipsum">Lorem Ipsum</h2>
    <p class="main-content">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.</p>
    <p>Go to the <a href="#Lorem_Ipsum">top</a>.</p>
  </body>
</html>
add comment
3

Yes, it is possible.
You should add an id attribute to your anchor element to give a name to the section of the page. The value of the attribute may be a word or a phrase
<a id="anchor-name">The section name here where you want to jump</a>

add comment
0

just give reference to that particuler div like
there is reference for about div in your page
like below

<a href="#about">About</a>
<div id="about">
</div>
add comment

Your Answer