Write a program in HTML using Hyperlink within a page.

Write a program in HTML using Hyperlink within a page.

 

<!DOCTYPE html>

<html>

<head>

          <title>linking within the page</title>

</head>

<body>

          <h1>Linking Within a page</h1>

          <a name="Top section"></a>

          <p>Top section</p>

          <p> <a href="#Middle section">

                   go to Middle section </a></p>

          <p><a href="#Bottom section">

                   go to Bottom section</a></p>

 

     HTML tutorial or HTML 5 tutorial provides basic and advanced concepts of html. Our HTML tutorial is developed for beginners and professionals. The major points of HTML are given below:

 

HTML stands for Hyper Text Markup Language.

HTML is used to create web pages.

HTML is widely used language on the web.

We can create static website by HTML only.

<a name="Middle section"></a>

<p>Middle section</p>

    <p><a href="#Top section">

                   go to TOP section</a></p>

          <p> <a href="#Bottom section">

                   go to Bottom section </a></p>

              

               What is HTML

          HTML is an acronym which stands for Hyper Text Markup Language. Let's see what is Hyper Text and what is Markup Language?

 Hyper Text: Hyper Text simply means "Text within Text". A text has a link within it, is a hypertext. Every time when you click on a word which brings you to a new webpage, you have clicked on a hypertext.

 Markup language: A markup language is a programming language that is used make text more interactive and dynamic. It can turn a text into images, tables, links etc.

 

An HTML document is made of many HTML tags and each HTML tag contains different content.

 

  <a name="Bottom section"></a>

          <p>Bottom section</p>

          <p> <a href="#Top section">

                   go to Top section </a></p>

          <p><a href="#Middle section">

                   go to Middle section</a></p>

 

     HTML Anchor

 

The HTML anchor tag defines a hyperlink that links one page to another page. The "href" attribute is the most important attribute of the HTML a tag.

 href attribute of HTML anchor tag The href attribute is used to define the address of the file to be linked. In other words, it points out the destination page.

 

The syntax of HTML anchor tag is given below.

 

<a href = "..........."> Link Text </a>

 Let's see an example of HTML anchor tag.

 

1. <a href="second.html">Click for Second Page</a>

   

 

</body>

</html>



Comments