JavaScript gets rid of the trailing slash in the <img /> tag
4 answers
In HTML, the <img> must be <img> , in XHTML it will be <img /> ... so depending on which DOCTYPE your page is using, this will change.
From the HTML 4.0 spec for <img> :
Start tag: required ; End tag: prohibited
In XHTML, elements must be closed:
Good formality is a new concept introduced by [XML]. In essence, this means that all elements must either have closing tags or be written in a special form (as described below), and that all elements must be placed correctly.
+6