The Wayback Machine - https://web.archive.org/web/20220121075619/https://www.geeksforgeeks.org/html-link-target-attribute/
Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | <link> target Attribute

  • Difficulty Level : Basic
  • Last Updated : 13 Dec, 2021

The HTML <link> target Attribute is used to specify the window or a frame where the linked document is loaded. It is not supported by HTML 5.

Syntax:

<link target="_blank|_self|_parent|_top|framename">

Attribute Values:

  • _blank: It opens the link in a new window.
  • _self: It is the default value. It opens the linked document in the same frame.
  • _parent: It opens the linked document in the parent frameset.
  • _top: It opens the linked document in the full body of the window.
  • framename: It opens the linked document in the named frame.

Example:




<!DOCTYPE html> 
<html>
       
<head>
    <title>
        HTML link target Attribute
    </title>
</head>
  
<body> 
    <center> 
        <h1 style="color:green;"> 
            GeeksforGeeks 
        </h1> 
          
        <h2> 
            HTML <link> target Attribute
        </h2> 
          
        <link href="geeksforgeeks.org" target="_blank">
    </center> 
</body> 
  
</html> 

Output:

Supported Browsers: The HTML <link> target attribute is not supported by any browsers.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!