What is Anchor Tag ?

<a> (Anchor Tag):Define a hyperlink, It is used to provide a link from one page to another page.Just one click it will move to another page, and display those page content.
Anchor tag Attributes are: href, target etc.

  • Normally by default link colour is Blue because at that time it is Unvisited link.
  • Visited link colour is Purple.
  • An Active link colour is Red.
  • You can change the colour of a link.

Example: <body link=”green” vlink=”black” alink=”orange”>

Here, link attribute is unvisited link, vlink is visited link, alink is active link.

Types of link:

1.Internal link: In which we provide a link of those file which is save in our system.

Example: <a href=”wepagesample.html”>Computer</a>

In this example “wepagesample.html” file need to save in our system folder only then output come.

2.External link: In which we provide an Online link.

Example:

<a href=”https://www.ahirlabs.com/2017/05/19/to-study-and-verify-the-truth-table-of-logic-gates/” target=”self”>To Study and Verify the Truth Table of Logic Gates. </a>

Href: Its full form is hypertext reference. It is the source of the file.

Target in anchor tag: It describe where to open a linked document.

  1. Blank: This target open the linked document in a new tab or window.
  2. Parent: Open the linked document in the parent frame.
  3. Self: Open the linked document in the current frame.
  4. Top: Open the linked document in the top most frame.
(Visited 109 times, 1 visits today)
Share with Friends :
Written by:

One thought on “Anchor Tag -HTML

Leave a Reply

Your email address will not be published. Required fields are marked *