Adding a target attribute with the value _blank

How to add a target attribute with the value _blank to the anchor (a ) element’s opening tag, so that the link opens in a new tab.

Hi there! Check this guide to learn about it:

1 Like

The target attribute indicates where to open the linked document. One value the attribute can take is _blank, which usually opens the linked item in a new tab or window. So if you want to add a target attribute with the value _blank to the anchor, it would look something like this:

<a href="freecodecamp.org" target="_blank">freeCodeCamp</a>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.