It's only required for XHTML standards, as mentioned in other answers. HOWEVER, it also has another use.
Some code editors such as Notepad++ allow you to expand/collapse tags to make for faster viewing. But if you just put ![]()
, how is it supposed to know the difference between a tag that doesn't require an end tag, and one that uses the same tag name but does (ie. in XML)? This is especially true if you use custom tags.
Therefore, using /> explicitly tells the editor that it's self-closing, allowing it to continue working just fine and not having it warn you about a mismatched tag.