HTML Anchor Tag
HTML Anchor tag used to create link one page to another page by its href attribute
Anchor tag attributes are href , target
href attribute specify the link of another page
Example
<body>
<p>Click link go to the home page of halflearning </p>
<a href="https://www.xlogy24.com">halflearning</a>
<body>
Example
Use anchor tag inside heading tag
<body>
<p>Click heading go to the home page of halflearning</p>
<h1><a href="https://www.xlogy24.com">halflearning</a></h1>
</body>
Note: You can use anchor tag inside another tag
Target Attribute
Target attribute specify the where link open in window tab like blank , self , parent , top
target="_blank"
Target black open new tab in window
Example
<body>
<p>Click link go to the home page of halflearning in new window tab</p>
<a href="https://www.xlogy24.com" target="_blank">halflearning</a>
</body>
Test code
Example
target="_self"
Target self specify the link open it current tab
Example
<body>
<p>Click link and open home page of halflearning in current tab</p>
<a href="https://www.xlogy24.com" target="_self">halflearning</a>
</body>
target="_parent"
Target parent attribute value specify the link open in parent tab
It mean if link inside the iframe open in parent tab


