Marking up a document with XHTML is virtually the same as with HTML. Documents are divided into a header and body (except framed documents, which have a frameset area), elements are marked using opening and closing tags, attributes control specific behaviors for those elements, and so on. Therefore, everything you've learned in Part II of this book applies to XHTML as well.
However, because it is an XML application, you need to play by the rigid rules of XML markup. What makes XHTML documents different from HTML 4 documents is that you need to be absolutely sure that your code is well-formed (i.e., exactly follows the syntax rules), you must declare the DTD that the document uses, and you must use the xmlns attribute to indicate the XML namespace. These issues are discussed in the following sections.