Ensuring valid HTML as much as possible.