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

Chapter 31. XHTML > Creating XHTML 1.0 Documents

31.2. Creating XHTML 1.0 Documents

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.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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