In this article we are going to explain what is anchor tag in html or how to link one page to another page using anchor tag with example.


HTML anchor tag (also known as hyperlink), allow users to link other web pages using images, words or phrases. When you hover a mouse arrow over these links, they take a shape of a hand. By default, the color of an unvisited link is blue, and of visited link is purple. The following syntax used to link a web page:


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



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

Simple example of html anchor tag:

<!DOCTYPE html>
    <title>Example of anchor tag </title>   
    <p> You can learn free html at  </p>
    <a href=""> our site. </a>


how to use html Text Link or html anchor tag

HTML anchor tag Target Attribute:

A target attribute defines, where a web page will open. The options available are listed below:




Opens a web page in new tab


Opens a web page in same window


Opens a web page in parent frame


Opens a web page in full body of the window


Opens a web page in named frame.


I hope this article will help to you after reading.

 Let's check live example

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like