Open multiple page or tab with single link in html

Open multiple page or tab with single link in html. Many times you may require to open multiple pages if you want to give related and dependent information. Even now a days many website are opening multiple pages with single link to display advertisement too. You can directly use hyper link text with some tag to implement this.

We can provide a link in our web page to move directly to another page by <a href> tag. 

<a href=”http://www.javascripthtml.com”>your text to appear as link</a>

Which will appear as : your text to appear as link

But here you require to open up a multiple pages or tab with single link,  for giving additional information, and making your clients to come across the content that you want to make them read once. Here is the way:

Open multiple page or tab with single link in html
Open multiple page or tab with single link in html

Open multiple page or tab with single link in html

To Open multiple tabs or window with a single link, write the below written code in your html body.

Let us have an example to Open multiple page with single link in html, we would open following three pages:

  1.  Javascript i.e : http://www.javascripthtml.com/category/javascript/
  2. Angularjs : http://www.javascripthtml.com/category/javascript/angularjs/
  3. Html : http://www.javascripthtml.com/category/html/

By adding onclick event and window.open property in <a href> tag, you can open multiple page. Here is the example to do this:

<a onclick="window.open('http://www.javascripthtml.com/category/javascript/'); window.open('http://www.javascripthtml.com/category/javascript/angularjs/')" href="http://www.javascripthtml.com/category/html/" target="_blank">JavaScript HTML related links </a>

Output of Open multiple page or tab with single link in html:

JavaScript HTML related links

For Internet explorer this code will open multiple new windows, while for Google chrome and Mozilla Firefox it will open new tabs. You must allow browser to open popup for this website, while testing.

I hope that the above post will make your work easy to open multiple pages with click on single link. Do comment for your feedback, problems and valuable suggestion

One thought on “Open multiple page or tab with single link in html”

  1. cant get out of tabs. cant load multi padges. just tabs..
    while I’m at it. everything here don’t work in iframes.

Leave a Reply

Your email address will not be published. Required fields are marked *