target=”_blank” validation

target=”_blank” is not valid code within webpages with a strict doctype declaration.

A valid replacement is :

<a href = “http://www.example.com” onclick = “window.open(this.href); return false;”>my link </a>

The onclick=”window.open(this.href); return false;”¬† is an inbuilt javascript method and needs a <meta> declaration¬† to work properly in in xml, strict xhtml or html4 source code pages.

<meta http-equiv=”Content-Script-Type” content=”text/javascript”>

target=”_blank” is however 100% valid in HTML5.