lime icon

Phosphorus and Lime

A Developer's Broadsheet

This blog has been deprecated. Please visit my new blog at
This is one of those things I keep having to look up. It involves the old target attribute you use in <a> links to open the link in a new window. This attribute is deprecated in XHTML strict and HTML 4.0 -- or so I hear.

Here, in any event, is the workaround:

onclick=",'_blank');return false;"

So this:

<a href="" target="_blank"></a>

Would become this:

<a href="" rel="external" onclick=",'_blank');return false;"></a>

(The rel attribute is not necessary but can be used for javascript functions to the same effect.)


keywords: link, links, anchor, blank, _blank, target, xhtml