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:
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:
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
HTML LINKS
- Anchor link
- Button link
- Download link
- Email link
- Image link
- Javascript link
- Link color
- New window link
- Text link
RAPID TABLES