lyoshenka lyoshenka - 1 year ago 78
HTML Question

target="_blank" vs. target="_new"

What's the difference between

<a target="_new">
<a target="_blank">
and which should I use if I just want to open a link in a new tab/window?

Answer Source

Use "_blank"!

According to the HTML5 WIP Spec:

A valid browsing context name is any string with at least one character that does not start with a U+005F LOW LINE character. (Names starting with an underscore are reserved for special keywords.)

A valid browsing context name or keyword is any string that is either a valid browsing context name or that is an ASCII case-insensitive match for one of: _blank, _self, _parent, or _top." - Source

That means that there is no such keyword as _new in HTML5, and not in HTML4 (and consequently XHTML) either. That means, that there will be no consistent behavior whatsoever if you use this as a value for the target attribute.