Open In App
Related Articles

HTML | <link> rel Attribute

Improve Article
Improve
Save Article
Save
Like Article
Like

The HTML rel attribute is used to specify the relationship between the current and the linked document. It is used only when href attribute present.
Syntax: 
 

<link rel="value">

Attribute Values 
 

  • alternate: It specifies the alternative link of the document(i.e. print page, translated or mirror).
  • author: It define author of the link
  • dns-prefetch: It Specifies that the browser should preemptively perform DNS resolution for the target resource’s origin
  • help: It specifies a link to a help document. Example: <link rel=”help” href=”/help/”>
  • icon: It specifies import icon in a given document
  • license: It specifies a link to copyright information for the document
  • next: It provide the link of next document in series
  • pingback: It specifies the address of the pingback serve
  • preconnect: It specifies the target should be preemptively to the origin resource
  • prefetch: It specifies that the target document should be cached.
  • preload: It specifies that the browser must preemptively fetch and cache
  • prerender: It specifies that the browser should load
  • prev: It specifies the previous document in a selection
  • search: It specifies the search tool for the document.
  • stylesheet: It Imports a style sheet

Example of HTML link rel Attribute 
 

html




<!DOCTYPE html>
<html>
 
<head>
    <link rel="stylesheet"
        type="text/css"
        href="index_screen.css">
 
    <link rel="stylesheet"
        type="text/css"
        href="index_print.css">
</head>
 
<body>
    <center>
        <h1>GeeksforGeeks</h1>
         
 
        target="_blank">
    Click here
    </a>
    </center>
</body>
 
</html>                   


Output: 
 

Supported Browsers: The browsers supported by HTML rel Attribute are listed below 
 

  • Google Chrome 1
  • Edge 12
  • Firefox 1.0
  • Apple Safari 
  • Opera 
  • Internet Explorer

 

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 06 Jun, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials