Tuesday, May 8, 2007

How to Make Links Open in a New Window

Most blog platforms let you use a button shortcut for adding a link in a post. You know the drill: you highlight the words you want to link, you click on the Link button, you paste in the URL. Easy-peasy.

But if you want the link to open in a new window, instead of having it take readers away from your page, you can click the "Edit HTML" tab and add a target tag to the link's code.

A link's HTML code looks like this (minus the spaces before and after the brackets):

< href="http://www.exampleURL.com">text text text< /a >

To make the link open in a new window, add target="new" between the URL's endquote and closing bracket. Like this:

< href="http://www.exampleURL.com" target="new">text text text< /a >

If you have a Typepad blog, you can install a widget that makes ALL links automatically open in new windows.

19 comments:

Margaret Mary Myers. said...

Where do I post a question? :) This is not on the "links that open in a new window" topic but a new topic. I have three Blogger blogs, one in classic template and the others in the new template. I don't want to leave classic template with my Margaret Mary Myers blog. I started to change over three times, and each time I panicked and went to "Revert to Classic Template". :) Now I'm happy there, and although I haven't studied html, I can usually reason my way to adding things to my template in html, by finding similar things, cutting and pasting,and experimenting. But here's my question (finally!). At the bottom of the pages of my two blogs that are in the new format, it says "Subscribe to Posts (Atom)" and "Older Posts", but neither of these options is on my MMM blog. I'd like to know how I can add them. Or is there something in Settings that's different, that I'm missing? Anyone have any ideas? Thanks so much! And I'm sorry this is so long!

Amy said...

Lissa, you have been reading my mind so much lately. I have been bothered by blogger automatically making links open in the same window, and have not spent the time to figure this out - now I don't have to! Thank you! :)

KC said...

There's widget that does this? Oh, my do you know the name?

arlawless said...

MMM, I've been wondering the same thing! I hope someone knows the answer!

Frater Bovious said...

Thanks for your blog. I found it by accident when I googled "Make link open in new page"

Anyway, your explanations are very clear and easy to follow. Thank you very much.

J Morgetron said...

Thanks. That was really helpful to me.

धनु साउद, भजनी said...

thanks for amazing trick buddy! two thumbs up for providing the same.

http://bhajani.blogsome.com

supertaster said...

thx, i needed that! wordpress sure makes it easier to allow links to open in new window, just click a button

Julia Borsos said...

There's actually an easier way to do this that applies for an entire article, or an entire blog!

Erique said...

Thank you very much! ;-)

GUGAW said...

thanks for this!

Brunox13 said...

I highly recommend to follow what "Julia Borsos said..." !!!

The Persimmon Perch said...

Yeah! Thanks that was just what I needed.

Louie said...

very nice and informative post for newbie bloggers ^^

Miss Penny said...

Thank you so much for all the info! This has been very helpful.

Heather said...

Thanks so much! That was exactly what I was needing!

Meggs said...

Thank you so much!!!

Running On Happiness said...

Thank you so much! These were very simple directions!

Cathy Kennedy said...

I became interested this morning in learning how to open a link in a new window when I stumbled across your tip on this subject. I haven't implemented the change yet, but will do so.

Have you ever had any dealings with highlighting or allowing your cursor to hover over a particular word and the definition for that word pops up in a new window? This is something I would like to incorporate into my blog posts. If you have experience with such an animal, then please contact me.

~Cathy Kennedy, Children's Author
The Tale of Ole Green Eyes

For my daily musings, visit Cathy Kennedy's Blog