Simplify the generated HTML code

Add a DOCTYPE, clean up rest of the markup, removing unnecessary tags/elements.

The code is now 100% valid as per [the HTML spec](http://whatwg.org/html). (Note that a `<title>` element is not always required specifically for cases like this.)