<script> Tag cannot be self closed?

Posted by Joe Hopfgartner on Stack Overflow See other posts from Stack Overflow or by Joe Hopfgartner
Published on 2010-12-25T21:39:00Z Indexed on 2010/12/25 21:54 UTC
Read the original article Hit count: 141

Filed under:
|
|
|

I had this code in my Website

<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"/>
<script type='text/javascript' src='/lib/player/swfobject.js'></script>

swfobject was not working (not loaded).

After altering the code to:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type='text/javascript' src='/lib/player/swfobject.js'></script>

It worked fine.

The document was parsed as HTML5.

I think its funny. Okay, granted a tag that is closed and a self closing tag are not the same. So i would understand if jquery couldnt load. Altough i find it rediciulous. But what i do not understand is that jquery loads but the following, correctly written tag, doesnt?

© Stack Overflow or respective owner

Related posts about html

Related posts about XHTML