Ads 468x60px

Pages

Tuesday, August 11, 2009

Anchor text and how to make hyperlink open in new window or tab


This post is for those very new to HTML, but want their hyperlink to open in new window or tab. I have already published a short post How to make links open in new windows but apparently there are some who still have problems understanding: "I'm not very tech savvy and I tried your solution, the code you provided, with the website taking the place of the word "Description" correct?" so let's try to make the instructions and explanation clearer.

First, an explanation about anchor text (that is what I called DESCRIPTION above). That is some text in your post that you want highlighted (normally blue). For example, I want these text: Make active (clickable) links in post and comments to link to another of my post on hyperlinks. So I highlight those text by clicking and dragging the mouse over those text (see screen shot below):

screenshot highlighted text for anchor text

These text is know as the anchor text. After highlighting the anchor text, click on the "insert link" icon Blogger insert link icon and a pop-up will appear where you are asked for the URL of the webpage you want the anchor text to be linked to:



Type or copy-paste the URL of the webpage you want to be linked to, click OK and if you are in the EDIT HTML mode, you will see the highlighted text being replaced by the hyperlink tag as follows:

<a href="http://www.bloggertipsandtricks.com/2006/09/how-to-make-links-open-in-new-windows.html">How to make links open in new windows</a>


Now if you want that hyperlink open in new window, all you have to do is to edit the hyperlink tag by adding target="_blank" as shown below:

<a href="http://www.bloggertipsandtricks.com/2006/09/how-to-make-links-open-in-new-windows.html" target="_blank">How to make links open in new windows</a>


After this, I hope you now understand fully what is meant by hyperlink, anchor text and how to make hyperlink open in new window or tab.

Update: If you don't want to do this individually but wants all links in your blog to open in new windows without you having to do anything, then refer to How to make all hyperlinks open in new windows

0 comments:

Post a Comment