Is <link> (not rel=“stylesheet”) allowed to be used in <body>?

后端 未结 7 533
情书的邮戳
情书的邮戳 2020-12-07 20:24

The new schema.org by Google, Yahoo and MS recommends usage of the attribute to display the status of products in an online shop:

&         


        
7条回答
  •  猫巷女王i
    2020-12-07 21:08

    The specification as of March 2020:

    If the rel attribute is used, the element can only sometimes be used in the body of the page. When used with the itemprop attribute, the element can be used both in the head element and in the body of the page, subject to the constraints of the microdata model.

    which is the opposite to what the accepted answer says as far as the rel attribute is concerned. I have personally never experienced issues by adding rel in the head though.

    Microdata is a WHATWG HTML specification used to nest metadata within existing content on web pages. Browsers, web crawlers and in particular search engines can extract and process Microdata from a web page and use it to provide a richer browsing experience for users.

提交回复
热议问题