Grammar Checking for the Web
Two of the basic rules governing how XHTML documents are created are defined as being well-formed and valid. Well-formed means that the document is complete; that is, tags that have been opened are closed, attribute values are fully quoted, and other structural components are complete. Using a grammar analogy, a well-formed document could be compared to a complete sentence. It has, at a minimum, a subject and a verb.
Validity takes the analogy one step further. A valid document is not only well-formed, but also meets all the additional grammar rules laid out in the DTD. The elements used must be defined in the DTD, the attributes must have appropriate values, the content model of elements must match the model defined, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access