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

Chapter 1. XHTML Fundamentals > XHTML Document Well-Formedness and Validity

XHTML Document Well-Formedness and Validity

The primary requirement of XHTML documents, as with any XML-based document, is that they be well-formed. Well-formedness means that all elements are written using proper syntax, they are closed where they should be, attribute values are always in quotes, and so on. Validity, which is a requirement of XHTML documents but an optional state for XML documents, requires that the syntax used in XHTML documents also conform to the document type definitions (DTDs) for those documents. You can't have elements nested within each other if the DTD prohibits it, attribute values must conform to the specified range of values, and the document must conform to any other restrictions set out in the DTD.

XHTML has three different DTDs that you might use. Which one is appropriate for your needs will depend on the answers to several questions you will explore throughout the rest of this chapter.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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