HTML <form> rel Attribute (original) (raw)
Last Updated : 23 May, 2026
The rel attribute in the
tag specifies the relationship between the current document and the linked resource after form submission. It is mainly used when the target="_blank" attribute opens the response in a new tab or window.- Defines the relationship between the current page and the destination resource.
- Common values include noopener, noreferrer, and external.
- Helps improve security and control browser behavior.
**Syntax:
- **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: This example uses rel="noreferrer" to prevent the browser from sending referrer information to the target webpage during form submission.
HTML `
GeeksforGeeks
HTML form rel="noreferrer" Attribute
<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>
`
**Example 2: This example uses rel="external" to indicate that the form submission points to a resource outside the current website.
HTML `