• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Validating XHTML Documents > Grammar Checking for the Web

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, and so on. In essence, the validator makes sure you haven't misplaced your modifiers or used the wrong verb tense.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint