HTML Basics

Anchor Tag

Posted on 30th April 2013

Anchor Tag: <a>

The anchor tags <a> and </a> are used to create a link to a resource such as an html page or any file. Links can be created around some text or an image by placing the text or image between the opening anchor tag <a> and closing tag </a>. The commonly used attributes for anchor tags are

href : To specify the location (URI) of the resource
Target: To specify the target frame where the link is to be opened. By default the target attribute will have the value "_self", so the link will open in the same frame where it was clicked. To open the link in a new window, you can set target="_blank"

Code:

<a href="http://www.opentechguides.com" target="_blank">Click here Tech Guides</a>

Displayed as:

Post a comment

Comments

Nothing yet..be the first to share wisdom.