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
Some external links augment the current document and should not be
restricted to metadata content. For example, the server may want to emit
a prefetch link within body content based on the generated content (well
after the head section was flushed).
Similarly, the position of a rel=stylesheet link in body can act as an
optimization and signal to the user agent that DOM content above it may
be painted - see [1]. However, note that this update does not define or
change how or when CSS is applied - that's a separate discussion.
All current browsers allow and process external resource links in body,
this update reflects what's implemented and being used by developers.
[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=27303#c37
PR: #616
@@ -11765,19 +11765,24 @@ gave me some of the songs they wrote. I love sharing my music.</p>
11765
11765
<p>A <code>link</code> element must have either a <code data-x="attr-link-rel">rel</code> attribute
11766
11766
or an <code data-x="attr-itemprop">itemprop</code> attribute, but not both.</p>
11767
11767
11768
-
<p class="note">If the <code data-x="attr-link-rel">rel</code> attribute is used, the element is
11769
-
restricted to the <code>head</code> element. When used with the <code
11770
-
data-x="attr-itemprop">itemprop</code> attribute, the element can be used both in the
11771
-
<code>head</code> element and in the <code>body</code> of the page, subject to the constraints of
11772
-
the microdata model.</p>
11773
-
11774
11768
<p>The types of link indicated (the relationships) are given by the value of the <dfn><code data-x="attr-link-rel">rel</code></dfn> attribute, which, if present, must have a value that
11775
11769
is a <span>set of space-separated tokens</span>. The <a href="#linkTypes">allowed keywords and
11776
11770
their meanings</a> are defined in a later section. <span w-nodev>If the <code
11777
11771
data-x="attr-link-rel">rel</code> attribute is absent, has no keywords, or if none of the keywords
11778
11772
used are allowed according to the definitions in this specification, then the element does not
11779
11773
create any links.</span></p>
11780
11774
11775
+
<p>If a <code>link</code> element has an <code data-x="attr-itemprop">itemprop</code> attribute,
11776
+
or has a <code data-x="attr-link-rel">rel</code> attribute that contains only keywords that are
11777
+
<span>body-ok</span>, then the element is said to be <dfn>allowed in the body</dfn>. This means
11778
+
that the element can be used where <span>phrasing content</span> is expected.</p>
11779
+
11780
+
<p class="note">If the <code data-x="attr-link-rel">rel</code> attribute is used, the element can
11781
+
only sometimes be used in the <code>body</code> of the page. When used with the <code
11782
+
data-x="attr-itemprop">itemprop</code> attribute, the element can be used both in the
11783
+
<code>head</code> element and in the <code>body</code> of the page, subject to the constraints of
11784
+
the microdata model.</p>
11785
+
11781
11786
<p>Two categories of links can be created using the <code>link</code> element: <span
11782
11787
data-x="external resource link">Links to external resources</span> and <span
11783
11788
data-x="hyperlink">hyperlinks</span>. The <a href="#linkTypes">link types section</a> defines
0 commit comments