Making the generated HTML pass validation