CHAPTER 3 WEB VOCABULARIES Cell (Web design course) phones and
Friday, July 27th, 2007CHAPTER 3 WEB VOCABULARIES Cell phones and personal digital assistants (PDAs) are capable of viewing web documents using either Wireless Markup Language (WML) or XHTML Basic. WML is an XML vocabulary for Wireless Application Protocol (WAP)-enabled phones, and XHTML Basic is a cut-down version of XHTML that includes only basic markup and text. XHTML Basic was created using XHTML s modularization framework, which I ll discuss in more detail in the XHTML Modularization section. XHTML Construction Rules The rules for constructing XHTML pages are a little different compared with HTML pages. You must follow these rules in XHTML: Include a DOCTYPE declaration specifying that the document is an XHTML document. Optionally include an XML declaration. Write all tags in lowercase. Close all elements. Enclose all attributes in quotation marks. Write attributes in full (i.e., don t minimize attributes). Use the id attribute instead of name. Nest all tags correctly. Specify character encoding. Specify language. You ll see how these rules are applied in the following section, which covers DOCTYPE declarations. I ll also work through some sample XHTML documents. DOCTYPE Declarations In any web vocabulary, you need to determine which elements and attributes are valid. In Chapter 2, you saw how you can do this using Document Type Definitions (DTD) and XML schemas. XHTML 1.0 allows for three different DOCTYPE declarations that determine which DTD to use. You can write the following XHTML documents: Transitional Strict Frameset A DOCTYPE declaration tells a validator how to check your web page. It also instructs a web browser to render your page in standards-compliant mode. Using an outdated or incorrect DOCTYPE makes browsers operate in Quirks mode, where they assume that you re writing old-style HTML.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.