HTML & CSS · Junior · Question 9 of 75

Why add rel="noopener noreferrer" to a link with target="_blank"?

Explanation

Without noopener, the new tab can use window.opener to replace the original page (reverse tabnabbing). noreferrer additionally omits the Referer header. Modern browsers already apply noopener to _blank by default, but the attribute is still written explicitly. Indexing is affected by nofollow, not these values.

Further reading

Problem with a question

HTML & CSS · Junior · question 9

Test yourself

Take the HTML & CSS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz