Page 178 - Webapplication11_C11_Flipbook
P. 178
The Target Attribute
The target attribute denotes where to open the linked document.
Syntax:
<a target="_blank|_self|_parent|_top|framename">
Attribute Values
Value Description
_blank The linked document is opened in a new window or tab.
_self The linked document is opened in the same frame as it was clicked (this is default).
_parent The linked document is opened in the parent frame.
_top The linked document is opened in the full body of the window.
Framename The linked document is opened in the named frame.
Example:
Let us understand each one by one.
<!DOCTYPE html>
<html>
<body>
<h1>Using the target attribute to open the webpage in a new tab</h1>
<p>Open link in a new window or tab: <a href=https://www.cbse.nic.in target="_
blank">Visit CBSE Portal</a></p>
</body>
</html>
176 Touchpad Web Applications-XI

