0

why can't you use <script> tags in a external scripts

i need a fully understand about "External Script"

20th Oct 2016, 11:32 PM
Julian Reid
2 odpowiedzi
+ 3
when you create an external script you save it by .js ext which tells the browser that its javascript. moreover< script> is used in html only.
25th Oct 2016, 7:14 AM
priyam chopra
priyam chopra - avatar
+ 2
Because <script> is an HTML tag. The tag <script>...</script> is used in HTML to say that the inner part must be in javascript, so you can't write HTML tags in a "script" tag and since "script" is an HTML tag you can't write it in another <script>...</script> tag (well, this seems a little confounding). Ok, consider that when you have an external script, the code is already in a tag <script> (that you can't see), so the inner code must be in javascript language. I hope I was useful :)
21st Oct 2016, 12:31 AM
Gabriele Trovato
Gabriele Trovato - avatar