A href code to open in new tab

To open a link in a new tab using HTML, you can use the target attribute and set its value to _blank. Here is the syntax:

<a rel="nofollow" target="_blank" href="https://www.example.com" target="_blank">Link Text</a>

This will open the link in a new tab or window when clicked.

Note: You can also use target="_new" or target="_noopener" instead of _blank, but _blank is the most commonly used and supported option.

Here are some additional options you can use with the target attribute:

For example:

<a rel="nofollow" target="_blank" href="https://www.example.com" target="_self">Link Text</a> <!-- opens in same tab -->
<a rel="nofollow" target="_blank" href="https://www.example.com" target="_parent">Link Text</a> <!-- opens in parent frame -->
<a rel="nofollow" target="_blank" href="https://www.example.com" target="_top">Link Text</a> <!-- opens in full body of window -->
<a rel="nofollow" target="_blank" href="https://www.example.com" target="_blank">Link Text</a> <!-- opens in new tab or window -->
<a rel="nofollow" target="_blank" href="https://www.example.com" target="_noopener">Link Text</a> <!-- opens in new tab or window, without access to parent page's context -->