html tutorial - rel Attribute in HTML - html5 - html code - html form

Learn html - html tutorial - Rel attribute in html - html examples - html programs
- The rel attribute is used to specify the relationship between the linked document and the current document.
Syntax for rel attribute in HTML:
<a rel=”value”></a>
Difference between HTML 4.01 and HTML 5 for rel Attribute:
HTML 4.01
- HTML 4 supports some values in rel attribute.
HTML 5
- Some values removed and some values added in HTML 5.
Applies To:
Elements | Attribute |
---|---|
<a> | rel |
<area> | rel |
<link> | rel |
rel Attribute Values:
Value | Description |
---|---|
auto | To load the entire media file when the page loads. |
alternate | Provides a link to an alternate representation of the document (i.e. print page, translated or mirror) |
alternate | Links to an alternate version of the document (i.e. print page, translated or mirror) |
author | Provides a link to the author of the document |
bookmark | Permanent URL used for bookmarking |
dns-prefetch | Specifies that the browser should preemptively perform DNS resolution for the target resource's origin |
external | Indicates that the referenced document is not part of the same site as the current document |
help | Provides a link to a help document |
icon | Imports an icon to represent the document. |
license | Provides a link to copyright information for the document |
next | Provides a link to the next document in the series |
nofollow | Links to an unendorsed document, like a paid link. |
noopener | Requires that any browsing context created by following the hyperlink must not have an opener browsing context |
noreferrer | Requires that the browser should not send an HTTP referer header if the user follows the hyperlink |
pingback | Provides the address of the pingback server that handles pingbacks to the current document |
preconnect | Specifies that the browser should preemptively connect to the target resource's origin. |
prefetch | Specifies that the target document should be cached |
prefetch | Specifies that the browser should preemptively fetch and cache the target resource as it is likely to be required for a follow-up navigation |
preload | Specifies that the browser agent must preemptively fetch and cache the target resource for current navigation according to the destination given by the "as" attribute (and the priority associated with that destination). |
prev | Indicates that the document is a part of a series, and that the previous document in the series is the referenced document |
search | Provides a link to a resource that can be used to search through the current document and its related pages. |
stylesheet | Imports a style sheet |
tag | A tag (keyword) for the current document |
Sample Coding for rel Attribute in HTML:
Tryit<!DOCTYPE html>
<html>
<head>
<title>Wikitechy rel attribute</title>
</head>
<body>
<a href="http://www.wikitechy.com/register" rel="nofollow">
Wikitechy SignUp</a>
</body>
</html>
Code Explanation for rel Attribute in HTML:

- This rel attribute used to specifies that the relation to the linked document.
- “nofollow” used to guide the search engine to do not follow the link.
Output for rel Attribute in HTML:

- The output shows that the link to “Wikitechy SignUp”. That the target page not followed by the search engine.
Browser Support for rel Attribute in HTML:
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes |