Possible Duplicate:
Why don’t self-closing script tags work?
I know, this is a very basic question. But I admit I don’t know an answer for this. I’m trying to include external js file in my html. Here are the two cases.
<script src="jquery-1_9_0.js"></script><!-- its working -->
<script src="jquery-1_9_0.js"/><!-- not working -->
Why is it so? where as for html input it works in both cases
<input type="text" value="enter value"/><!-- works -->
<input type="text" value="enter value"></input><!-- Also works -->
Can I know the reason?
From XHTML 1 specification
And from XHTML 1 DTD (strict)
This means that an element that is not specified as
EMPTYcannot be self-closing.You can write
<hr/>or<br/>, but you cannot write<script />or<textarea />. Think them as a container for their content. A container cannot be self-closing.