HTML Link In A New Window

RapidTables Search Share Home > Web > HTML > Link > Link in new window / tab HTML link in a new window

How to open a link in a new window or new tab.

Open a link in a new window or tab

In order to open a link in a new window / tab, add target="_blank" inside the <a> tag:

<a href="../html-link.htm" target="_blank">Open page in new window</a>

The code will create this link:

Open page in new window

New window or new tab

You can't set whether the link will be opened in a new window or new tab. It depends on the browser's settings.

Open a link in a new window with specified size

In order to open a link in a new window, add Javascript command onclick="window.open('text-link.htm', 'name','width=600,height=400') inside the <a> tag:

<a href="../html-link.htm" target="popup" onclick="window.open('../html-link.htm','name','width=600,height=400')">Open page in new window</a>

The code will create this link:

Open page in new window

See also

  • HTML links
  • HTML anchor link
  • HTML button link
  • HTML download link
  • HTML image link
  • HTML link color
  • HTML mailto link
  • HTML text link

Write how to improve this page

Submit Feedback
HTML LINKS
  • Anchor link
  • Button link
  • Download link
  • Email link
  • Image link
  • Javascript link
  • Link color
  • New window link
  • Text link
RAPID TABLES
  • Recommend Site
  • Send Feedback
  • About
Home | Web | Math | Electricity | Calculators | Converters | Tools

© RapidTables.com | About | Terms of Use | Privacy Policy | Cookie Settings

Từ khóa » Html5 A Tag Open In New Tab