Make various fixes/cleanup to HTML templates

This includes tabs/four spaces -> two spaces, moving header rows to `<thead>` and other rows to `<tbody>` (even when `<tbody>` was optional), closing unclosed tabs, and removing optional self-closing slashes.