Thursday, 25 June 2009

How to make hyperlink open in a new window

This is for you bloggers out there. When you insert a link, by default it takes the browser away from your blog to the link. Ok, we know that by right clicking on the link, the user can choose to open the link in a new tab/window, but you probably also know that a significant percentage of users aren't aware of that. So, here's a way to force it to happen.

After writing up your post and inserting the link, click on EDIT HTML at the top. Look for the code where your link appears. Between the quotes and the greater than symbol, add target="_blank".

Be warned, however, that it has been claimed this code has been deprecated and is not XHTML compliant, but it still works for me. :-)
HTML, XHTML, and CSS All-in-One Desk Reference For Dummies

No comments:

Post a Comment

Note: only a member of this blog may post a comment.