Web Page Design and Hosting

July 31, 2007

162 Part II: HTML, XHTML, CSS and Accessibility

Filed under: Web Design — webmaster @ 9:40 am

162 Part II: HTML, XHTML, CSS and Accessibility note CSS provides some terrific ways to style list bullets and numeric values. See Chapter 8, Style Tips for Type and Design to learn more. Secret #118: DOCTYPE Switching As you ve come to learn in these markup chapters, DOCTYPEs are required components of a valid HTML or XHTML document. The DOCTYPE declaration has historically been passive, with no actual function until the document is passed through a validator and uses the declaration to determine which DTD to validate the document against. Historically, manyWeb authors have not validated their documents, much less authored to standards, although, fortunately, that is a changing trend. Understanding the way the languages with which we work and how the browsers respond to them is surely the road to long-termsuccess and survival as aWeb designer. So knowing this stuff is really important. Another equally important but lesser known reason that the DOCTYPE declaration is so significant has to do with a switching mechanism that s been added to all contemporary browsers to allow those browsers to identify documents that appear to be standardized. This allows them to render the documents more quickly and accurately. This becomes very important when you begin using CSS, especially for layout. Studying the problem of CSS implementation in browsers, Tantek C elik, a programmer for Microsoft who has been involved with browser development and standards for some years now, recognized that no browser could afford to move ahead with more compliant and consistent technologies without allowing for reasonable backward compatibility. cross ref See Chapter 9, Laying Out Pages with CSS for more details about how DOCTYPE switching influences display. The solution C elik devised was to split the browser s capabilities into two modes: Quirks mode and Standards (or compliance )mode. Quirks mode is the implementation of rendering engines in use that manage nonstandard markup (essentially the same forgiving rendering that we ve relied on for years). It is forgiving of our shortcomings as well as those of our tools, but can be incredibly inconsistent as a result. Compliance mode, on the other hand, is a streamlined standards-compliant rendering engine, allowing for faster, more accurate, and more controlled rendering of your designs. Web browsers with DOCTYPE switching technology rely on specifically formed DOCTYPE declarations for proper switching to occur. DOCTYPE declarations can be written in any number of ways. The default DOCTYPEs in many visual tools and HTML editors are problematic for the reasons I mentioned earlier in this chapter. There s nothing wrong with those DOCTYPEs in any technical sense, but there is something wrong with them in regards to DOCTYPE switching technology. You must use some very specific DOCTYPEs to

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


No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Java Web Hosting