Hyperlink

Introduction

Hyperlink is used to link to another page / section of page or to download a file.

Type of links:
<a> tag is used to create a hyperlink.
<a href="url">Text</a> is used to create a hyperlink with text.
<a href="#id">Text</a> is used to create a hyperlink to specific location of the page.
<a href="mailto:email">Text</a> is used to create a link to send email

Parametrs:
href attribute is used to specify the URL of the page the link goes to.
e.g. <a href="https://www.google.com">Google</a>

target attribute is used to specify where to open the linked document.
"_blank" opens the linked document in a new window or tab.
e.g. <a href="https://www.google.com" target="_blank">Google</a>

Hyperlink with image

Hyperlink with image is used to create a hyperlink with an image.

<a href="url">
  <img src="image.jpg" alt="image">
</a>

Output:
Google

Hyperlink to specific location

Hyperlink to specific location is used to create a hyperlink to specific location of the page.

<a href="#id">Text</a>

Output:
Top