Create a HTML document to jump to another part of a document (on the same page).


Input


<!DOCTYPE html>
<html>
  <head>
    <style>
    .main-content {
      height: 100vh;
    }
    </style>
  </head>
  <body>
    <h2 id="HTML">HTML</h2>
    <p class="main-content">
      Hypertext Markup Language (HTML) is the standard markup language for documents <br>designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets<br> (CSS) and scripting languages such as JavaScript.
    </p>
    <p>Go to the
      <a href="#HTML">top</a>.
    </p>
  </body>

</html>




Output






After clicking on the "top",it will go to the top of the page

No comments:

Post a Comment