Is target=_blank the best way or is there something else that has replaced it?
This IMO is still the best way to do it. And will work with any sane browser even when everything else like javascript and the like fails. Even as I seem to recall that the target attribute at some time was removed from one or the other XHTML standard (I think XHTML Strict).
It disappeared in XHTML Strict, but it would appear that target="_blank"
will remain in HTML5, but browser makers will be encouraged to allow users to disable the behaviour (and default it to disabled).
In this article at 456 Berea Street, Roger Johansson recommends using JavaScript instead of the _target
attribute, as the _target
attribute is invalid in strict HTML/XHTML. However, he also recommends you avoid making links open in new windows as much as possible.
Remember HTML is only meant for content, not behaviour. Hence we have CSS for layout and JS for behaviour. For that reason you should use JS for the open in a new window functionality. This is why XHTML strict doesn't allow target="_blank".