In HTML 5, the closing slash is optional on void elements such img
(I am adding this because the currently accepted answer only says: “end tags must not be specified for void elements”, and does not address closing slashes in void elements).
Citing from http://www.w3.org/TR/html5/syntax.html#start-tags (number 6):
Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single “https://stackoverflow.com/” (U+002F) character. This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.