<script src=”test.js”/> or <script src=”test.js”> </script>?

<script src=”test.js”></script> is correct in HTML5. Self-closed script tag is illegal in html5. The following content after <script src=”test.js”/> will be considered as javascript code until </script> is met. So, the script in other <script> tags after <script src=”test.js”/> may not be executed and the content of the webpage may not be displayed.

The whole <script src=”test.js”></script>, however, can be put inside <head></head>, or <body></body>, even after <body></body>.

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:

Leave a Reply