rules: improve html template

Add some comments and fixes rule display. A div was not closed and
result was display to be too wide.