html - Why don't we use <script src='xyz' /> in HTML5? -


the html5 tutorials looking @ use

<script scr='lib/jquery/dist/jquery.min.js'></script>' 

instead of

<script scr='lib/jquery/dist/jquery.min.js' /> 

is there specific reason why shorter version not used?

yes there is. empty elements tag valid in xhtml. in html5 <script /> means <script> , not <script></script> not closing script tag in html5. said, there number of self closing tags in html5. can use instance <br /> interpreted <br> because self closing tag not need closed. tailing slash added make xml.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -