Chapter 7: Moving Ahead with XHTML 163 kick the browser in question into Standards mode. All of the DOCTYPEs in this chapter will do the trick. Here s how the behavior breaks down: Documents with older or Transitional DOCTYPEs, poorly formed DOCTYPES, or no DOCTYPE at all are displayed using Quirks mode, and will be interpreted with the legacy bugs and behaviors of version 4 browsers. Documents with properly formed HTML Strict or XHTML DOCTYPEs are displayed using Compliance mode. This mode follows W3C specifications for HTML, CSS, and other layout languages as closely as possible. Of course, any browser (including Netscape 4) that came along before DOCTYPE switching was conceived will act just as Quirks mode does. In contrast, Opera 6 and earlier does not bother with DOCTYPE switching, but those browsers work more like standards mode does, because Opera has been purposely developed with standards in mind. note For an excellent overview of DOCTYPE switching, read DOCTYPE Switching and Standards Compliance by Matthias Gutfeldt. The article describes the technical details regarding the switching technology and provides additional resources (http://gutfeldt.ch/matthias/articles/doctypeswitch.html). Secret #119: Enclose Inline Elements in Blocks If you re using XHTML 1.0 Strict or XHTML 1.1, you can t have any widowed inline elements. This means that any inline element must appear within a block. Listing 7-4 shows a valid XHTML 1.0 Transitional document with an image (which is an inline element) marked up on a line by itself. This is allowed in HTML and XHTML Transitional. Listing 7-4: Valid transitional document with a widowed inline element < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Linux Web Hosting services