HTML Program to Create Links to Other Pages in HTML

February 24, 2022, Learn eTutorial

A web page can contain many links that allow visitors to navigate between Web sites by clicking on words, phrases, and images. There are two types of links: internal links and external links. An Internal link is used to link the page to your website page. If you are linking to any other website page, it is known as an external link.

You can add links in your HTML text by using the tag . This means tag defines a hyperlink. The necessary attribute of the element is the href attribute, which indicates the link's destination.

<a >Anchor Text</a>

HTML Source Code

                                          <!DOCTYPE html>

      <title>Hyperlink Example</title>
      <base href = "">
      <p>Click any of the following links</p>
      <a href = "" target = "_blank">Opens in New</a> |
      <a href = "" target = "_self">Opens in Self</a> |
      <a href = "" target = "_parent">Opens in Parent</a> |
      <a href = "" target = "_top">Opens in Body</a>