HTML - Text Links Or Anchors
The World Wide Web got its spidery name from the plentiful connections (links) that link websites together with the click of a button. What most people don't know is that HTML links are actually HTML anchors constructed using anchor tags (<a>).
HTML Text Link
<a>MY IT World Text Link!</a>
HTML Text Link
While the example above appears and feels like a text link when viewed through a web browser, the element is incomplete as it is missing a vital attribute that references another web page called a Hypertext Reference (href).
HTML - Hypertext Reference href
A Hypertext Reference (href) is an HTML attribute of an anchor (link) tag that requires a valid URL in order to properly direct a user to a different location. In other words, this Hypertext Reference is where users will navigate to if they do click on this link. Use the demonstration below as a reference.
HTML Text Link Code
<a href="http://www.myitworld.info/" target="_blank">My IT World</a>
<a href="http://cgtotal.pald.in/" target="_blank">cgtotal</a>
HTML Text Links
The address of a website is called a Uniform Resource Locator (a URL), and it acts like a street address for a website as a user is directed from one site to another. There are different types of URLs, and each has a slightly different look. The examples above link to what are known as Global URLs, since they are external web addresses that do not reside on the Tizag.com domain. Here's a look at the different types of URLs.
HTML - Link Targets
The target attribute defines how each link will open when clicked. Will each one open in a new window, or will each one open in the current browser window? As the web designer, you call the shots as to how a user navigates from page to page, so long as you know how to handle the target attribute.
|_blank||Opens new page in a new browser window|
|_self||Loads the new page in the current window|
|_parent||Loads new page into a parent frame|
|_top||Loads new page into the current browser window,
cancelling all frames
The two most important values are the top two, (target="_blank" and target="_self"). The _self value is generally the default. It loads each new page in the current browser window, while _blank opens up a new web browser window with each click of the text link.