HTML rel Attribute
Example
<a rel="nofollow" href="http://www.google.com/">Best Search Engine</a>
Meaning
The rel attribute specifies the relationship of the target object to the link object.
Notes:
- Only used if the href attribute is exist.
- Used for SEO purpose also.
Standard Syntax
<element rel="value">
Browser Support
Status
Applies to:
The rel attribute can be used on the following element:
Attribute Values
Value | Description |
---|---|
alternate | Provides a link to an alternate representation of the document (print, translate etc...) |
author | Provides a link to the author of the document |
bookmark | Permanent URL is used for bookmark |
external | Specifies that the referenced document is not part of the same site as the current document |
help | Provides a link to a help document |
license | Provides a link to licensing information for the document |
next | Provides a link to the next document in the series |
nofollow | Specifies Link not to be follow (by search engines). |
noopener | The hyperlink must not have an opener browsing context |
noreferrer | It makes the link referrer unknown. |
prev | Specifies that this is previous document. |
search | A search tool for the document |
tag | Provide tag for the current document |
More Examples
<area> tag example
<img src="img/desk.jpg" usemap="#image-map">
<map name="image-map">
<area rel="next" target="_blank" alt="Computer" title="Computer" href="img/computer.png" coords="365,99,905,783" shape="rect">
<area rel="next" target="_blank" alt="Cup" title="Cup" href="img/cup.png" coords="1047,672,97" shape="circle">
<area rel="next" target="_blank" alt="Mobile" title="Mobile" href="img/mobile.png" coords="960,385,1040,541" shape="rect">
<area rel="next" target="_blank" alt="Book" title="Book" href="img/book.png" coords="175,426,96,527,20,664,232,755,298,628,364,505" shape="poly">
</map>
<link> tag example
<head>
<link rel="stylesheet" href="demo/demo.css">
</head>