Targeting How the Link Opens

The target attribute provides us a way of specifying to a browser how a link will open in the browser. The default behavior is to open the linked document in the same window/tab from which is was clicked. If manually included, the attribute’s value would be set to "_self".

Other values include:

  • "_blank" - Opens the linked document in a new window or tab
  • "_parent" - Opens the linked document in the parent frame
  • "_top" - Opens the linked document in the full body of the window
  • "framename" - Opens the linked document in a named frame
HTML
<a href="URL" target="_blank">link text</a>