Introduction:

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.

Description:

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:

Syntax:

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

 

Example:

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


Simple example of html anchor tag:

<!DOCTYPE html>
<html>
<head>
    <title>Example of anchor tag </title>   
</head>
<body>
    <p> You can learn free html at  </p>
    <a href="https://www.sqltutorialspoint.com"> our site. </a>
</body>
</html>

Output:

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:

HTML Tag

Description

_blank

Opens a web page in new tab

_self

Opens a web page in same window

_parent

Opens a web page in parent frame

_top

Opens a web page in full body of the window

_framename

Opens a web page in named frame.

 

I hope this article will help to you after reading.

0 comments


Leave a comment

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

you may also like