3 ms·
If you agree that code is good, you need to bone up on your HTML. <img> tags are self-closing in all versions of HTML (as far as I can recall), and the end tag
by chc 16y ago
If you agree that code is good, you need to bone up on your HTML. <img> tags are self-closing in all versions of HTML (as far as I can recall), and the end tag is specifically invalid in later versions. In XHTML, you can write it that way, but using the self-closing syntax (<img/>) is more efficient and readable. A closing <img> tag is wasteful at best and invalid at worst.