Articles → HTML → Anchor Tag In HTML

Anchor Tag In HTML






Syntax


<a href=”page_name”>text</a>



Sample


<html>

<head>
	<title>Anchor Demo</title>
</head>

<body> <a href="page1.html">Click here to go to page1</a> </body>

</html>

Try It


Output


Picture showing the output of anchor tag





Target Attribute In The Anchor Tag




TargetPurposeDemo
_blankOpens the linked document in a new windowTry It
_selfOpens the linked document in the same windowTry It
_parentOpens the link in the parent windowTry It
_topOpens the link in the full body of the windowTry It
framenameOpen the target document in the specified frameTry It



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Saturday, December 26, 2015
 
Updated On  -  Sunday, April 2, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250