Friday, November 21, 2008

Don’t leave me!

Here is a small tip for anyone with a website or a blog: Why not make your links open up in separate windows so your visitors don’t have to leave your website? Just open your HTML editor and look for a link, which will look something like this:

<a href="http://somewebsiteorother.com">The link</a>

Simply add the following code after the link exactly as shown:

target="_blank"

So it looks like this:

<a href="http://somewebsiteorother.com" target="_blank">The link</a>

Be sure to include the underscore.

6 comments:

Carter said...

I see you've done it on the Internet Review of Books pages, and it's great! Thank you.

But blogger won't let me do it here. I tried. :-)



Carter

Ruth D~ said...

Oh great! I've been looking for this code. Rich Bylina sent it to me ages ago, and it's been misplaced.

Carter said...

And then it went and put "blogger" in the URL and screwed it up. :-(

Rose City Reader said...

Thank you! Great tip and I am going to start using it ASAP. Now, I wonder how long it would take me to add it to the code for all my links . . .

Ruth D~ said...

Love this!!! Just came back to get the code again!

sc morgan said...

Thanks, Bob. I love this little piece of code. I've been using it now on my blog and it works like a charm!