How To Use target="_blank" Correctly In XHTML & HTML Strict


/ Published in: HTML

If you've ever used a strict doctype and used the target attribute on links you'll notice that it doesn't validate. Here is an easy solution.


Copy this code and paste it in your HTML
  1. <a href="http://www.nealgrosskopf.com" onclick="window.open(this.href);return false;">Link</a>

URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=2

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.