Open In App

HTML <form> rel Attribute

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:

Example 1: 






<!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:




<!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:


Article Tags :