How to convert most HTML pages to XHTML. 1. Heading lines at top At the beginning of documents we need to include a few lines: The location of the dtd allows validating parsers to check the document. Most browsers will ignore these tags.