Thursday 28 July 2011

Html tutorials - How to make links open in a new window

This post will be definitely useful for the visitors of my blog or bloggers who have the same problem with what the title of this post says. Thanks to one blogger I found the way I found the way how to fix the problem. So from now all the links in my posts will be 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.