Is the <link> tag allowed after </html>?

The HTML5 recommendation seems to have a little ambiguity regarding <link>: http://www.w3.org/TR/html5/document-metadata.html#the-link-element

There is a phrase

Contexts in which this element can be used: Where metadata content is expected.

And there is no exact definition of this context. But the whole page describes content of this kind, for example. head, title, base, link, meta, style.

There is also a paragraph:

The link element must have the rel attribute. If the rel attribute is used, the element is limited to the head element.

It seems to have redundant or mutually exclusive phrases.

. Can someone clarify the situation with the position of the tag <link>?

Does Google treat https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery#example correctly or violate the W3C recommendation?

+4
source share
2 answers

linknot allowed outside the item html. The item htmlis the only permitted root item.

Inserting an element in headcannot put it out html, because it headmust also be in html.

+6
source

The element <link>must be inside the element <head>, which, in turn, must be inside </html>.

The only thing you can put outside <html>is a comment or DOCTYPE

+1
source

All Articles