<HTML>
<HEAD>
<TITLE>HTML 5 Script Tag</TITLE>
</HEAD>
<BODY>
<FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'>Is there any good reason why a </SPAN></FONT></FONT><FONT COLOR="#881B80"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><script></SPAN></FONT></FONT></FONT><FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'> tag with the </SPAN></FONT></FONT><FONT COLOR="#994400"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'>src</SPAN></FONT></FONT></FONT><FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'> attribute specified can’t be self-closing?<BR>
<BR>
I understand the need for a </SPAN></FONT></FONT><FONT COLOR="#881B80"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><script> </SPAN></FONT></FONT></FONT><FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'>tag to have an open and close tag when you’re executing javascript inline:<BR>
<BR>
</SPAN></FONT></FONT><FONT COLOR="#881B80"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><script </SPAN></FONT></FONT></FONT><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><FONT COLOR="#994400">type</FONT><FONT COLOR="#881B80">="</FONT><FONT COLOR="#1A1CA6">text/javascript</FONT><FONT COLOR="#881B80">"><BR>
</FONT><FONT COLOR="#808080"> </FONT>   <FONT COLOR="#AA2291">alert</FONT>(<FONT COLOR="#C41B16">"Huzzah! I got executed just like you though I would."</FONT>);<BR>
<FONT COLOR="#881B80"></script><BR>
</FONT></SPAN></FONT></FONT><FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'><BR>
However “best practices” suggest keeping all your scripts external unless you absolutely need to use inline scripting. So it seems odd to have an open and close tag when you’re including an external JS file since it won’t execute anything inside the tags anyway:<BR>
<BR>
</SPAN></FONT></FONT><FONT COLOR="#881B80"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><script </SPAN></FONT></FONT></FONT><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><FONT COLOR="#994400">src</FONT><FONT COLOR="#881B80">="</FONT><FONT COLOR="#082CEE"><U>js/behaviour.js</U></FONT><FONT COLOR="#881B80">" </FONT><FONT COLOR="#994400">type</FONT><FONT COLOR="#881B80">="</FONT><FONT COLOR="#1A1CA6">text/javascript</FONT><FONT COLOR="#881B80">"><BR>
</FONT><FONT COLOR="#808080"> </FONT>   <FONT COLOR="#AA2291">alert</FONT>(<FONT COLOR="#C41B16">"Boo! I won’t get executed just because the src attribute is specified. Weak sauce."</FONT>);<BR>
<FONT COLOR="#881B80"></script><BR>
</FONT></SPAN></FONT></FONT><FONT SIZE="5"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:9pt'><BR>
</SPAN></FONT><SPAN STYLE='font-size:9pt'><FONT FACE="Lucida Grande">I feel like, if you’re including an external JS file, the syntax should look more like the </FONT></SPAN></FONT><FONT COLOR="#881B80"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><link></SPAN></FONT></FONT></FONT><FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'> tag used to include CSS files or even the </SPAN></FONT></FONT><FONT COLOR="#881B80"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><img></SPAN></FONT></FONT></FONT><FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'> tag with it’s </SPAN></FONT></FONT><FONT COLOR="#994400"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'>src</SPAN></FONT></FONT></FONT><FONT SIZE="5"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:9pt'> attribute. Both are self-closing and for good reason. Is there any possibility of including this syntax in the HTML 5 spec or is there some reason this can’t be done?<BR>
</SPAN></FONT><SPAN STYLE='font-size:9pt'><FONT FACE="Consolas, Courier New, Courier"><BR>
</FONT></SPAN></FONT><FONT COLOR="#881B80"><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><script </SPAN></FONT></FONT></FONT><FONT SIZE="4"><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:8pt'><FONT COLOR="#994400">src</FONT><FONT COLOR="#881B80">="</FONT><FONT COLOR="#082CEE"><U>js/behaviour.js</U></FONT><FONT COLOR="#881B80">" </FONT><FONT COLOR="#994400">type</FONT><FONT COLOR="#881B80">="</FONT><FONT COLOR="#1A1CA6">text/javascript</FONT><FONT COLOR="#881B80">" /><BR>
</FONT></SPAN></FONT><SPAN STYLE='font-size:8pt'><FONT FACE="Verdana, Helvetica, Arial"><BR>
<BR>
<FONT COLOR="#EAB70C">-- <BR>
</FONT><FONT COLOR="#54321A"><B>James W Cready</B></FONT><FONT COLOR="#3598B1"> </FONT><FONT COLOR="#EBB80D">— </FONT><FONT COLOR="#54321A">Associate Web Developer<BR>
jcready@rtcrm.com </FONT><FONT COLOR="#3699B2">»</FONT><FONT COLOR="#3598B1"> </FONT><FONT COLOR="#54321A">office</FONT><FONT COLOR="#EAB70C">:</FONT><FONT COLOR="#3497B0"> </FONT><FONT COLOR="#C8651C">(</FONT><FONT COLOR="#54321A">202</FONT><FONT COLOR="#C8651C">)</FONT><FONT COLOR="#3497B0"> </FONT><FONT COLOR="#54321A">339</FONT><FONT COLOR="#C8651C">-</FONT><FONT COLOR="#54321A">6265<BR>
</FONT><FONT COLOR="#533119"><BR>
rtc relationship marketing </FONT><FONT COLOR="#EBB80D">—</FONT><FONT COLOR="#3699B2"> www</FONT><FONT COLOR="#C8651C">.</FONT><FONT COLOR="#3699B2">rtcrm</FONT><FONT COLOR="#C8651C">.</FONT><FONT COLOR="#3699B2">com<BR>
</FONT><FONT COLOR="#533119">1055 thomas jefferson st</FONT><FONT COLOR="#C8651C">.</FONT><FONT COLOR="#533119"> nw</FONT><FONT COLOR="#C8651C">,</FONT><FONT COLOR="#533119"> suite 200</FONT><FONT COLOR="#C8651C">,</FONT><FONT COLOR="#533119"> washington</FONT><FONT COLOR="#C8651C">,</FONT><FONT COLOR="#533119"> dc 20007<BR>
<BR>
</FONT></FONT><FONT COLOR="#EBB80D"><FONT FACE="Century Gothic">a wunderman network agency</FONT></FONT></SPAN></FONT>
</BODY>
</HTML>