Monday, 9 September 2013

Is it needed to close the script tag when it's used for embedding an external script file?

Is it needed to close the script tag when it's used for embedding an
external script file?

pIn old times we used to embed external JavaScript this way:/p
precodelt;script src=external.js type=text/javascriptgt;lt;/scriptgt;
/code/pre pHTML5 came to save our eyes and fingers, so the construct
became shorter:/p precodelt;script src=external.jsgt;lt;/scriptgt;
/code/pre pNot a big deal, I'm just curious if we can leave away the
enclosing codelt;/scriptgt;/code?/p pLike this:/p precode/* This code may
fail */ lt;script src=external.js/gt; /code/pre

No comments:

Post a Comment