4

This might sound like a reaaaally dumb question but...

why do browsers have a fit with this syntax:

<script type='text/javascript' src="/path/to/my.js" />

and want this instead

<script type='text/javascript' src="/path/to/my.js"></script>

Seems the first construct should be valid since there's no inner content to the tag..

?

Ben
  • 20,737
  • 12
  • 71
  • 115

1 Answers1

0

Why don't self-closing script tags work?

Community
  • 1
  • 1
Dustin Laine
  • 37,935
  • 10
  • 86
  • 125