Last Updated : 06 Jul, 2021
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:
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:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4