@geekpowered is right - the official way for using a self-closing element is to incorporate a space between the element identifier and forward slash - <br /> or <hr />. However, as you have discovered, all of the other options will render in a browser. I find I'm somewhat of stickler when it comes to syntax, so tend to be fairly strict with myself when it comes to formatting my HTML documents.
While I'm here, have you seen the new HTML5.2 documentation, @geekpowered - some of the inclusions and invalid practices are here if you're interested: Bits of Code