How the Text Link Works

How the Text Link Works

Big links, small links, even the tiny links, no matter which one you use, all made of Hypertext Reference (href), an HTML attribute of an anchor tag that requires a valid Uniform Resource Locator (URL), which acts like a street address for a website and directs user from one site to another when one clicks or taps on it. They are in fact one of the most important aspects of the user experience for any website.

click_here_long

The Reference in It

A text link, which we explain in the earlier article – Make the Site with Text Links works based on how you define the reference in it. A reference can be global, local, or internal. It can also has a target, by which you can give user the option to open a link to a new browser window or in the current window. How the user open that link is very vital for your site, because a webpage that opens a new browser window each time a user clicks a link is not the greatest way to entice users to stick around.

Different Types of URLs

There are different types of URLs, and each has a slightly different look. Take a look the tree different references of URLs.

1. herf=”http://www.alexamaster.com”
2. herf=”../support/”
3. herf=”#comments”

The first one is Global URL, which we normally use for linking domains other side of your website.
The second one is use for local URL, which links other pages within your website.
The third one with hashtag is to link anchors embedded with in the current page. In this case if the comments section has already embedded that, it will take you to that section.

Define Your Targets

You might have seen two of the most common value of link target attribute, target=”_blank” and target=”_self”. The _self value is their by default, which loads a new page in the current browser window, where as the _blank opens up a new web browser window with each click of the text link.

Beside _blank and _self, there are two more attributes, which we add the same way we add herf, followed by an equal sign and attribute inside the double quotation marks. Here is the list of all four target attributes.

1. target=”_blank”, which opens new page in a new browser window
2. target=”_self”, which loads the new page in the current window
3. target=”_parent”, which loads new page into a parent frame
4. target=”_top”, which loads new page into the current browser window, cancelling all frames

An example of complete text link would be:

<a herf=”http://www.alexamaster.com” target="_blank">Alexa Master</a>

As the web designer, you task is to define these attribute correctly to give user the best way to navigate content. Do let us know how you use these attributes daily.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *