W3C HTML DTD Validation Web Standard
HTML code can be automatically validated against a formal description of the HTML language in a DTD (Document Type Definition). The formal description lists elements and attributes, along with rules on how they can be combined.