Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Closing <script>

This is a stupid question, and I am aware that it is; but never the less, here it comes:

Is it possible to close a <script>-tag within itself, so to speak? I mean if you are using an external javascript-document can you close the tag like this:

<script type="text/javascript" src="xxx.js" />
like image 756
Latze Avatar asked Aug 09 '10 13:08

Latze


2 Answers

As far as I am aware of it, no.

Browsers usually ignore self closing script tags.

like image 95
Adhip Gupta Avatar answered Sep 21 '22 14:09

Adhip Gupta


Have a look at this topic Why don't self-closing script tags work?

like image 29
ppolyzos Avatar answered Sep 23 '22 14:09

ppolyzos