Sunday, June 29, 2008

Having a link open in a new window :: Simple HTML

You know how some links open in a new window, thereby keeping the reader/viewer at your website/blog? My simple href links (built in functionality with always navigate people away from my blog - to the linked site.

Many months ago, I tried to figure this out - how to have a link open in a new window. Just now, determined to get the bottom of it, I did a search and found out how simple it is. I found what I was looking for in about 5 seconds.

The trick is to add the code target="_blank" just after the final quote mark and before the close bracket symbol ">".

Note that below I've omitted the first open bracket "<" before "a href" to disable the functionality of the link...

a href="" target="_blank">

Here is the result. Clicking the link should open a new window.


No comments: