Microdata extends HTML5 in a way that link
and meta
elements can be used in the body
, if they contain an itemprop
attribute.
If the
itemprop
attribute is present onlink
ormeta
, they are flow content and phrasing content. Thelink
andmeta
elements may be used where phrasing content is expected if theitemprop
attribute is present.
This extension is currently also included in the HTML 5.1 Nightly (Editor’s Draft) (see link
element and meta
element). But as the Microdata specification became a W3C Note recently, we’ll have to see what happens with this reference.
RDFa 1.1 extends HTML5 in a way that link
and meta
elements can be used in the body
, if they contain a propertỳ
attribute.
If the
@property
RDFa attribute is present on thelink
ormeta
elements, they MUST be viewed as conforming if used in thebody
of the document. More specifically, whenlink
ormeta
elements contain the RDFa@property
attribute and are used in thebody
of an HTML5 document, they MUST be considered flow content.
So you are not allowed to use any link
element (e.g., <link href="" rel="" />
) in the body
, but only those with an itemprop
attribute (for Microdata) resp. a property
attribute (for RDFa).
- with an
itemprop
attribute (for Microdata), or - with a
property
attribute (for RDFa), or - with a
rel
value that is defined as "body-ok" (see zgreen’s answer).
Thus your link
element can be used in the body
:
<body>
<!-- … -->
<link itemprop="url" href="http://en.wikipedia.org/wiki/The_Catcher_in_the_Rye" />
<!-- … -->
</body>