Where to insert JavaScript Libraries and CSS in my HTML code?

前端 未结 4 688
暖寄归人
暖寄归人 2021-01-16 00:57

I am little new to web development and when I was searching internet about other topics, I have seen many people has put popular JS Libraries in Different Places of

4条回答
  •  太阳男子
    2021-01-16 01:35

    CSS can added inside header tag & but put all JS Libraries and custom files just before closing closing body tag

    
     //other tags
    
    
    
    • By doing so you wont have to check if DOM content has loaded.
    • It decrease page loading time.Otherwise a js need to be completely loaded before DOM loading.
    • It also makes sure that all events are attached properly to DOM element.

    I think this address all your concern specially the third one

提交回复
热议问题