Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sonofslim

macrumors 6502a
Original poster
Jun 6, 2003
742
0
when you're referring to external javascript files, is there any benefit to this:
Code:
<script src="foo.js" type="text/javascript" />
over this?
Code:
<script src="foo.js" type="text/javascript"></script>

because both validate, but the former makes certain browsers (*cough* IE5/Mac *cough*) totally soil themselves. is there any reason i wouldn't want to use the second format?
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
Since all browsers don't fully support XHTML (i.e. some browsers don't support self closing tags like in your example), just use the latter and they should be happy.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.