I have the following piece of HTML that creates a new window when clicked:
glide by the people
>
Actually, the proposed here solutions with adding the "target" attribute through JavaScript are completely standards compliant!
The thing is that according to the W3C DOM Level 1 specification the interface HTMLLinkElement DO have target attribute, although the A element from HTML 4.01 specification do not have it.
So it's invalid to write "target" attribute in html file, but is valid to add it to the document tree later via DOM interfaces using JS.