Create a link to move within a single page rather than to load another page

HTML CodeTry it

<!-- Create a link to move within a sinle page rather than to load another page -->

<body>

<!-- 1st page code -->
   <div>
      <div>
         <div class="links">
            <h1>This is 1st page</h1>
            <a href="next2.html" class="next">Next Page --></a>
         </div>
      </div>
   </div>

<!-- 2nd page code -->

<!-- 
   <div>
      <div>
         <div class="links">
            <h1>This is 2nd page</h1>
            <a href="next1.html" class="pre"> <--Previeus Page</a>
            <a href="next3.html" class="next">Next Page -></a>
         </div>
      </div>
   </div> -->

<!-- 3rd page code -->

<!-- 
   <div>
      <div>
         <div class="links">
            <h1>This is 3rd page</h1>
            <a href="next2.html" class="pre"> <--Previeus Page</a>
         </div>
      </div>
   </div> -->
</body>

CSS CodeTry it

body{
   font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.links{
   padding: 20px;
}
.links h1{
   padding: 10px;
   color: rgb(41,4,4);
}
.links a{
   padding: 5px 50px;
   font-size: 20px;
}

OutputTry it

Comments

Popular posts from this blog

PHP Code to print first 10 Fibonacci Numbers

Create a simple HTML page to demonstrate the use of different tags

Use Tables to provide layout to your web page.