Open In App

HTML <form> rel Attribute

Last Updated : 06 Jul, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

The HTML <form> rel attribute is used to define the relationship between the current document and the linked document. The “rel” stands for relationship. It denotes that, we connect an external CSS with the HTML page. 

Syntax:

<form rel="value">

Attribute values:

  • external: It specifies that the external document is not a part of current site.
  • help: It specifies a link to a help document.
  • license: It defines a copyright information for the document.
  • next: It specifies the next document in a selection.
  • nofollow: It specifies that the google search spider should not follow that link and mostly used for paid links.
  • noreferrer: It defines the browser should not send an HTTP referrer header, if the user follows the hyperlink.
  • prev: It defines a  previous document in a selection.
  • search:  It specifies the search tool for the document.

Example 1: 

HTML




<!DOCTYPE html>
<html>
  
<body>
    <h2 style="color: green">GeeksforGeeks</h2>
    <h2>HTML form rel="noreferrer" Attribute</h2>
  
    <b>This will avoid information passed to the post page </b>
  
    <!-- It avoids passing the referrer information
        to target website by removing the referral 
        info from the HTTP header.
        It is safe to use -->
    <form rel="noreferrer" action="mypage.php">
        <input type="search" placeholder="search here" />
        <input type="button" value="search" />
    </form>
</body>
  
</html>



 

Output:

Example 2:

HTML




<!DOCTYPE html>
<html>
  
<head>
    <style>
        h2 {
            font-family: Impact;
            color: green;
        }
  
        body {
            text-align: center;
        }
    </style>
</head>
  
<body>
    <h2>GeeksforGeeks</h2>
  
    <b> HTML Form rel="external" Attribute </b>
  
    <!-- The referred document is not part 
        of the current site -->
    <form rel="external" action="mypage.php">
        User_id:<input type="text" /><br /><br />
        Password:<input type="password" /><br />
        <input type="submit" value="submit" />
    </form>
</body>
  
</html>


Output:

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads