How to close image tag in HTML?
<img src="#"></img>
or
<img src="#" />
<img src="#">
in xhtml:
<img src="#" alt="some explaining" />
the closing / is for backwards compatibility
in html5
<img src="#" alt="some explaining">
no need anymore to close the <img> tag, (the browser knows that it is self-closing)
<img>
more info here: http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element (thanks to Chris)
1.4m articles
1.4m replys
5 comments
57.0k users