FAQ: Learn HTML Elements - Common HTML Elements - Opening Links in a New Window

For ease of use, using one anchor for multiple links, less coding

Leaving target="_blank" opens a new tab each time I click the link. So 20 clicks 20 tabs, which eats up RAM and CPU. What is the best way to open a new tab once, and only switch to the same tab when I click the second time?

I don’t you can do this, then it’s up to the user to switch to the open tab

1 Like

Thank you for the answer. I copied the link to the target field, and at least in firefox it did the trick, opens a single tab and refreshing it with another click on the hyperlink, I don’t know if it would work on another browser, because it is nowhere mentioned as a standard way to handle target attribute. It look"s like this:

<a href="https://en.wikipedia.org/wiki/Brown_bear" target="https://en.wikipedia.org/wiki/Brown_bear">Learn More</a>

Learn More
Maybe it needs scripting to do that properly.

So I’m halfway into the second lesson on HTML and wondering where I can practice! I don’t have a project or site to build but really need to practice what I’m learning or it’s going to ooze out of my brain… Suggestions?