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 Dcode tech </p>
<a href="https://www.Dcode tech">Dcode tech</a>
<body>
Example
Use anchor tag inside heading tag
<body>
<p>Click heading go to the home page of Dcode tech</p>
<h1><a href="https://www.Dcode tech">Dcode tech</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 Dcode tech in new window tab</p>
<a href="https://www.Dcode tech" target="_blank">Dcode tech</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 Dcode tech in current tab</p>
<a href="https://www.Dcode tech" target="_self">Dcode tech</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


