Skip to main content

HTML Guide

Bad value “” for attribute “target” on element “a”: Browsing context name must be at least one character long.

The target attribute on <a> elements can’t be blank.

This attribute defines the browsing context for links, that is, where should the linked documents be opened. This was used extensively on the now deprecated <frame> element, so you could give the name of the frame to open the document in, but is now more used to force links to open in a separate tab or window using target="_blank". Another option is using a name, so the new browsing context can be referred to on subsequent clicks on links with the same target.

For example, this will force the links to open on a new tab:

<a href="https://example.com" target="_blank">will open a blank tab</a>

Learn more:

Related W3C validator issues