Do <link href=“”> tags only go in the <head> tag?

前端 未结 6 1467
清歌不尽
清歌不尽 2020-12-09 15:34

Is it possible/good practice to use to include stylesheets outside of the tag, or do they only work / should the

6条回答
  •  情歌与酒
    2020-12-09 16:08

    It's possible to do it.

    It's not recommended to do it, because whatever content comes before the will start rendering and then when the stylesheet is loaded will be rerendered with the new styles. That means that the pageload will be slower (because the browser has to redo all that work) and uglier (because there will be this flash of content with one style that's then restyled to look different).

提交回复
热议问题