An XHTML document may be validated against a DTD. However, before an XHTML document can be properly validated a DTD must be added to the first line of the file.
The W3C offers a freely available markup validation service that can check Web documents for conformance to W3C XHTML DTD standards.