making the html doc well-formed