Home > Article > Web Front-end > How to open a new window by clicking on a link in HTML
htmlHow to click a link to open a new window: This can be achieved by using the target attribute of the a tag, such as [target="_blank"]. The target attribute specifies where to open the linked document, and _blank indicates opening the linked document in a new window.
The operating environment of this tutorial: Windows 10 system, HTML5 version. This method is suitable for all brands of computers.
(Learning video sharing: html video tutorial)
Attribute introduction:
3499910bf9dac5ae3c52d5ede7383485 Where is the target attribute of the tag? Open the linked document.
Syntax:
<a target="_blank|_self|_parent|_top|framename">
Attribute value:
_blank Open the linked document in a new window.
_self Default. Open the linked document in the same frame.
_parent Open the linked document in the parent frameset.
#_top Open the linked document in the entire window.
#framename Open the linked document in the specified frame.
Implementation:
<a href="abc.html" target="_blank">点击这里</a>
Related recommendations: html tutorial
The above is the detailed content of How to open a new window by clicking on a link in HTML. For more information, please follow other related articles on the PHP Chinese website!