Search code examples
htmlhref

How to create several url targets in one link


I would like to create a link to several tabs in HTML. I know how to have one link that will open in another tab, but I'm not sure how to add an additional url that will open up simultaneously to the first one i a different tab as well.

<a href="url1" target="_blank">All the links in one button</a>

Solution

  • You can do

    <a href="url1" onclick="window.open('url2');" target="_blank">All
    the links in one button</a>
    

    That said, I think many browsers may block these kind of popups since they are used by spammers a lot.