open new tab html link code example
Example 1: opem link in new tab html
<a href="your link" target="_blank">The home page will open in another tab.</a>
Example 2: open new tab html
<a href="your link" target="_blank">The home page will open in another tab.</a>
Example 3: how to make a link in html that opens in a new tab
add attribute : target = "_blank"
Example 4: a tag open in new tab
<a href="#" target="_blank" rel="noopener noreferrer">Link</a>
Example 5: how to make a link open in new tab html
<a href="URL" target="_blank">Click here to go to my link</a>
<!--The A tags are for hyper links, href stands for hypertext reference
target="_blank" opens link in a new tab-->
Example 6: html open html in new tab as plain text
document.querySelector("#username").addEventListener('click', function() {
setTimeout(function() {
let username = document.querySelector('#username').value;
window.open("https://www.github.com/" + username, "_blank");
}, 2000);
}