Fix HTML

Elements were not in the correct place in the DOM due to HTML errors
such as missing and incorrect closing tags. Fix these so that the DOM is
as intended.

Signed-off-by: James Lowe <james_gh@jlowe.demon.co.uk>