Skip to content

Commit e863c64

Browse files
committed
rel
1 parent 7c14bdd commit e863c64

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,44 @@ The `<div>` element only represents its child elements and doesn\'t have a speci
22162216
<b><a href="#">↥ back to top</a></b>
22172217
</div>
22182218

2219-
#### Q. ***Where and why is the rel="noopener" attribute used?***
2219+
## Q. ***Explain the use of rel="nofollow", rel="noreferrer", rel="noopener" attribute?***
2220+
2221+
**1. rel="nofollow"**
2222+
2223+
When `rel="nofollow"` tag is used, it instruct the search engines not to pass any PageRank from one page to the other. It does not allow it to pass the authority to the specific website. The main advantage of using this attribute is to control the spam attack.
2224+
2225+
There may be times, when you do not have control over what people publish on your websites, for example some blog comments and some kind of forum posting.
2226+
2227+
**Example**
2228+
2229+
```html
2230+
<a href="https://www.website.com" rel="nofollow">Link to yoursite.com</a>
2231+
```
2232+
2233+
**2. rel="noreferrer"**
2234+
2235+
Noreferrer is related to analytics and tracking. The referrer value shows the previous page where a user came from. By using the noreferrer attribute on a link, you are preventing other pages from seeing that traffic came from a click on your link.
2236+
2237+
**Example**
2238+
2239+
```html
2240+
<a href="https://www.website.com" rel="noreferrer">Link to yoursite.com</a>
2241+
```
2242+
2243+
**3. rel="noopener"**
2244+
2245+
It prevents the new page from being able to access the `window.opener` property and will make it run in a separate process. noopener tag works as a security fix which prevents malicious links to take control over an opened tab.
2246+
2247+
**Example**
2248+
2249+
```html
2250+
<a href="https://www.website.com" target="_blank" rel="noopener">Link to yoursite.com</a>
2251+
```
2252+
2253+
<div align="right">
2254+
<b><a href="#">↥ back to top</a></b>
2255+
</div>
2256+
22202257
#### Q. ***Can a web page contain multiple `<header>` elements? What about `<footer>` elements?***
22212258
#### Q. ***What are Web Workers?***
22222259
#### Q. ***Discuss the differences between an HTML specification and a browser\'s implementation thereof.***

0 commit comments

Comments
 (0)