Link Targets

Published April 06th 2009 by
Filed under HTML

There are 4 main targets that a hyper link can use. They are:

  • TARGET=”_blank”
  • TARGET=”_self”
  • TARGET=”_top”
  • TARGET=”_parent”

TARGET=”_blank” is the most useful. It opens the link in a new window or tab depending on the browser in use. TARGET=”_self” opens the link in the current window but is rarely used because omitting the target code altogether will open the link in the current window also so there is no need to put it in.

You can also create your own targets by defining frames on your page with different names which is what TARGET=”_top” and TARGET=”_parent” are similar to. The only difference is Top and Parent are predefined.