The HTML5 tutorials I am currently looking at use
<script scr='lib/jquery/dist/jquery.min.js'></script>'
instead of
<script scr='lib/jquery/dist/jquery.min.js' />
Is there a specific reason why the shorter version is not used?
The HTML5 tutorials I am currently looking at use
<script scr='lib/jquery/dist/jquery.min.js'></script>'
instead of
<script scr='lib/jquery/dist/jquery.min.js' />
Is there a specific reason why the shorter version is not used?
Yes there is. The empty elements tag is only valid in XHTML. In HTML5 <script /> just means <script> and not <script></script> So you are not closing your script tag in HTML5. That said, there are a number of self closing tags in HTML5. You can use for instance <br /> it will be interpreted as <br> because it is a self closing tag that does not need to be closed. The tailing slash is added to make it look like XML.