May 01, 2011

How to Make Links Open in New Tab In Blogger

Whenever you insert links into your posts in blogger, your reader's browser will open them on current tab or window that your post is displayed. Sometimes, it leads to reduce average time readers stay on your post and it may be not you want.

Blogger editor does not support to specify location where links display. By default, it will open in current tab. If you want to change it, you should insert target property into your anchor tags in 'Edit HTML' mode. For example,
<a href="YOUR LINK URL" target="_blank"> YOUR ANCHOR TEXT </a>

In situation where your post has lots of links, you may be easily tired. We need a fancy method.

Here we go.

1. Sign-in your blogger account.

2. Go to Dashboard << Design << Edit HTML

3. Backup / Restore current template (use button in top of the showing page). Whenever you change the HTML template, DO Backup before begin.

4.Find the begin tag of <head>. Just use the find function of your browser(in most case, Ctrl+F) with "<head>".

5. Insert following code after the <head> tag.
<base target='_blank' />

Since, the <base> tag specifies a default address or a default target for all links on a page, all links in your blog will now open on new tab or windows. The <base> tag actually as no end tag (i.e. </base>) as HTML document, but you must have end tag or slashed end (/>) because blogger template is based on XHTML.