Currently, all tags are treated in the XML way, which is wrong.
Expected: <br> green, </br> red
Actual: both green
Void HTML tags must not have an end tag. This applies to br, hr and wbr.
Expected: all three tags in green
Actual: </div> red
Void HTML tags are automatically closed, so this nesting is correct.
While self-closed HTML tags currently work as expected, they are deprecated. A self-closing tag should only be accepted for void HTML tags, and for MediaWiki tags (note that pre is a MediaWiki tag in this sense).