You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* <a target="_blank"> has implicit noopener as per spec.
See: whatwg/html#4330
Removed the wordings that could imply the behavior is vendor-specific.
Added links to Browser compatibility for easy reference.
* <a>: Merged the two similar notes, added more links.
* <area> <form>: Applied the same from 517d127 and c531fc3.
Should follow up when browser-compat-data for form is revised.
* <a> <area> <form>: Applied the new note box style.
<li>Defining a value suggests it as the filename. <code>/</code> and <code>\</code> characters are converted to underscores (<code>_</code>). Filesystems may forbid other characters in filenames, so browsers will adjust the suggested name if necessary.</li>
42
42
</ul>
43
43
44
-
<divclass="note"><strong>Notes:</strong>
44
+
<divclass="notecard note">
45
+
<h4>Notes</h4>
45
46
46
47
<ul>
47
48
<li><code>download</code> only works for <ahref="/en-US/docs/Web/Security/Same-origin_policy">same-origin URLs</a>, or the <code>blob:</code> and <code>data:</code> schemes.</li>
48
49
<li>
49
-
<p>Note: if the <code>Content-Disposition</code> header has different information from the <code>download</code> attribute, resulting behavior may differ:</p>
50
+
<p>If the <code>Content-Disposition</code> header has different information from the <code>download</code> attribute, resulting behavior may differ:</p>
<li><code>_top</code>: the topmost browsing context (the "highest" context that’s an ancestor of the current one). If no ancestors, behaves as <code>_self</code>.</li>
90
91
</ul>
91
92
92
-
<divclass="note">
93
-
<p><strong>Note:</strong> When using <code>target</code>, add <code>rel="noreferrer noopener"</code> to avoid exploitation of the <code>window.opener</code> API.</p>
94
-
</div>
95
-
96
-
<divclass="note">
97
-
<p><strong>Note:</strong> In newer browser versions (e.g. Firefox 79+) setting <code>target="_blank"</code> on <code><a></code> elements implicitly provides the same <code>rel</code> behavior as setting <code>rel="noopener"</code>.</p>
93
+
<divclass="notecard note">
94
+
<h4>Note</h4>
95
+
<p>Setting <code>target="_blank"</code> on <code><a></code> elements implicitly provides the same <code>rel</code> behavior as setting <code><ahref="/en-US/docs/Web/HTML/Link_types/noopener">rel="noopener"</a></code> which does not set <code>window.opener</code>. See <ahref="#browser_compatibility">browser compatibility</a> for support status.</p>
<dd>Hinted at the {{Glossary("character encoding")}} of the linked URL.
109
-
<divclass="note">
110
-
<p><strong>Note:</strong> This attribute is obsolete and <strong>should not be used by authors</strong>. Use the HTTP {{HTTPHeader("Content-Type")}} header on the linked URL.</p>
107
+
<divclass="notecard note">
108
+
<h4>Note</h4>
109
+
<p>This attribute is obsolete and <strong>should not be used by authors</strong>. Use the HTTP {{HTTPHeader("Content-Type")}} header on the linked URL.</p>
<dd>Was required to define a possible target location in a page. In HTML 4.01, <code>id</code> and <code>name</code> could both be used on <code><a></code>, as long as they had identical values.
117
-
<divclass="note">
118
-
<p><strong>Note:</strong> Use the global attribute {{HTMLAttrxRef("id")}} instead.</p>
116
+
<divclass="notecard note">
117
+
<h4>Note</h4>
118
+
<p>Use the global attribute {{HTMLAttrxRef("id")}} instead.</p>
<dd>The shape of the hyperlink’s region in an image map.
125
-
<divclass="note"><strong>Note:</strong> Use the {{HTMLElement("area")}} element for image maps instead.</div>
125
+
<divclass="notecard note">
126
+
<h4>Note</h4>
127
+
<p>Use the {{HTMLElement("area")}} element for image maps instead.</p>
128
+
</div>
126
129
</dd>
127
130
</dl>
128
131
@@ -227,7 +230,8 @@ <h3 id="Linking_to_an_element_on_the_same_page">Linking to an element on the sam
227
230
</pre>
228
231
229
232
<divclass="notecard note">
230
-
<p><strong>Note:</strong> You can use <code>href="#top"</code> or the empty fragment (<code>href="#"</code>) to link to the top of the current page, <ahref="https://html.spec.whatwg.org/multipage/browsing-the-web.html#scroll-to-the-fragment-identifier">as defined in the HTML specification</a>.</p>
233
+
<h4>Note</h4>
234
+
<p>You can use <code>href="#top"</code> or the empty fragment (<code>href="#"</code>) to link to the top of the current page, <ahref="https://html.spec.whatwg.org/multipage/browsing-the-web.html#scroll-to-the-fragment-identifier">as defined in the HTML specification</a>.</p>
231
235
</div>
232
236
233
237
<h3id="Linking_to_an_email_address">Linking to an email address</h3>
@@ -319,7 +323,7 @@ <h2 id="Security_and_privacy">Security and privacy</h2>
319
323
320
324
<p><code><a></code> elements can have consequences for users’ security and privacy. See <ahref="/en-US/docs/Web/Security/Referer_header:_privacy_and_security_concerns"><code>Referer</code> header: privacy and security concerns</a> for information.</p>
321
325
322
-
<p>Using <code>target="_blank"</code> without <code>rel="noreferrer"</code> and <code>rel="noopener"</code> makes the website vulnerable to {{domxref("window.opener")}} API exploitation attacks (<ahref="https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/">vulnerability description</a>), although note that, in newer browser versions (e.g. Firefox 79+) setting <code>target="_blank"</code> implicitly provides the same protection as setting <code>rel="noopener"</code>.</p>
326
+
<p>Using <code>target="_blank"</code> without <code><ahref="/en-US/docs/Web/HTML/Link_types/noreferrer">rel="noreferrer"</a></code> and <code><ahref="/en-US/docs/Web/HTML/Link_types/noopener">rel="noopener"</a></code> makes the website vulnerable to {{domxref("window.opener")}} API exploitation attacks (<ahref="https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/">vulnerability description</a>), although note that, in newer browser versions setting <code>target="_blank"</code> implicitly provides the same protection as setting <code>rel="noopener"</code>. See <ahref="#browser_compatibility">browser compatibility</a> for details.</p>
<dd>Use this attribute only if the {{htmlattrxref("href", "area")}} attribute is present.
110
-
<divclass="note">
111
-
<p><strong>Note:</strong> In newer browser versions (e.g. Firefox 79+) setting <code>target="_blank"</code> on <code><area></code> elements implicitly provides the same <code>rel</code> behavior as setting <code>rel="noopener"</code>.</p>
110
+
<divclass="notecard note">
111
+
<h4>Note</h4>
112
+
<p>Setting <code>target="_blank"</code> on <code><area></code> elements implicitly provides the same <code>rel</code> behavior as setting <code><ahref="/en-US/docs/Web/HTML/Link_types/noopener">rel="noopener"</a></code> which does not set <code>window.opener</code>. See <ahref="#browser_compatibility">browser compatibility</a> for support status.</p>
<dd>Comma-separated <ahref="/en-US/docs/Web/SVG/Content_type">content types</a> the server accepts.
64
-
<divclass="note"><strong>This attribute was removed in HTML5 and should not be used.</strong> Instead, use the {{htmlattrxref("accept", "input")}} attribute on <code><input type=file></code> elements.</div>
64
+
<divclass="notecard note">
65
+
<h4>Note</h4>
66
+
<p><strong>This attribute was removed in HTML5 and should not be used.</strong> Instead, use the {{htmlattrxref("accept", "input")}} attribute on <code><input type=file></code> elements.</p>
67
+
</div>
65
68
</dd>
66
69
<dt>{{htmlattrdef("accept-charset")}}</dt>
67
70
<dd>Space-separated <ahref="/en-US/docs/Web/Guide/Localizations_and_character_encodings">character encodings</a> the server accepts. The browser uses them in the order in which they are listed. The default value means <ahref="/en-US/docs/Web/HTTP/Headers/Content-Encoding">the same encoding as the page</a>.<br>
@@ -127,6 +130,10 @@ <h3 id="Attributes_for_form_submission">Attributes for form submission</h3>
127
130
</ul>
128
131
129
132
<p>This value can be overridden by a {{htmlattrxref("formtarget", "button")}} attribute on a {{HTMLElement("button")}}, <code><ahref="/en-US/docs/Web/HTML/Element/input/submit"><input type="submit"></a></code>, or <code><ahref="/en-US/docs/Web/HTML/Element/input/image"><input type="image"></a></code> element.</p>
133
+
<divclass="notecard note">
134
+
<h4>Note</h4>
135
+
<p>Setting <code>target="_blank"</code> on <code><form></code> elements implicitly provides the same <code>rel</code> behavior as setting <code><ahref="/en-US/docs/Web/HTML/Link_types/noopener">rel="noopener"</a></code> which does not set <code>window.opener</code>.</p>
0 commit comments