-2

What attribute and value can you use to cause an element to open the link in a new browser tab?

Quintopulous
  • 11
  • 1
  • 3

2 Answers2

0

To open a link in a new tab you need to add target="_blank" to the anchor tag.

<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a/" target="_blank">Mozilla</a>

Mozilla

Daniel
  • 1,392
  • 1
  • 5
  • 16
0

You can use with the attribute target

    <a href="https://www.youtube.com/" target="_blank">The page will open in another tab.</a>