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

后端 未结 7 484
情书的邮戳
情书的邮戳 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条回答
  • 2020-12-07 21:24

    As noted by the others <link> can be used in the body, but only sometimes. In those cases it's referred to as "body-ok". Here's a list of which link types are body-ok: https://html.spec.whatwg.org/multipage/links.html#body-ok

    As of 20 June 2018 the following can be used in the body:

    <body>
        <link rel="dns-prefetch">
        <link rel="modulepreload">
        <link rel="pingback">
        <link rel="preconnect">
        <link rel="prefetch">
        <link rel="preload">
        <link rel="prerender">
        <link rel="stylesheet">
    </body>
    
    0 讨论(0)
提交回复
热议问题