Currently, all tags are treated in the XML way, which is wrong.
a<br>b</br>c
Expected: <br> green, </br> red
Actual: both green
Void HTML tags must not have an end tag. This applies to br, hr and wbr.
a<div>b<br>c</div>d
Expected: all three tags in green
Actual: </div> red
Void HTML tags are automatically closed, so this nesting is correct.
a<div />b
Expected: red
Actual: green
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).