It is very wrong to use closing slash in HTML - it has completely different meaning in SGML than in XML.
https://www.cs.tut.fi/~jkorpela/html/empty.html
And even if you have XHTML doctype but do not server your document with XHTML MIME type browsers will treat it as HTML. So all "liking" to use XHTML syntax in HTML were just lucky that no mainstream browser bothered to implement this part of SGML handling correctly.