javascript - Difference between <script /> and <script></script> for importing multiple js file in HTML -


this issue faced, trying import multiple js files in html page -

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore.js" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js" /> <script src="lib/js/backbone.js" /> 

but issue facing is, loading first js file , rest of js file not getting loaded. checked network section in browser, remaining 2 file not getting called. changed syntax -

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script> <script src="lib/js/backbone.js"></script> 

and loading of 3 files happened successfully. question is,

<script src="" />  

a wrong syntax or issue specific me?

script tag requires both starting , ending tag. from mdn:

tag omission: none, both starting , ending tag mandatory.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -