XHTML 1.0, 1.1, and Modularization
XHTML 1.0 is a reformulation of HTML as an XML application. XHTML 1.0 can be seen as ideologically coming from HTML 4.01, and being technically stricter because of XML’s influence.
XHTML will display in your browser identically to the equivalent HTML. You might want to use XHTML if there is any chance you’re going to need to reprocess your content, for example to send it to a PDA; XML’s stricter syntax rules make automatic processing of XHTML much easier and cheaper than ordinary HTML.
Ideologically, XHTML 1.0 inherits the following general concepts from HTML 4.01:
- That presentation and document formatting should be separated via style sheets
- That documents should be made accessible
- That documents should be internationalized
XHTML 1.0 also uses the model of three DTDs: Strict, Transitional, and Frameset. This model originally emerged in HTML 4.0 and followed through to HTML 4.01.
Some important technical practices from XML onto XHTML includes:
- That all document types are declared via the correct DOCTYPE declaration
- That the structure of a conforming document contain the DOCTYPE declaration, an html element with the XHTML namespace declared, a head element including the title element, and a body element
- That all elements and attribute names are written in lower case, and that all attribute values are quoted
- That all non-empty elements (e.g. p, li) are properly terminated with a closing tag
- That all empty elements (e.g. br, hr, img) are properly terminated with a trailing slash (<br />)
- That documents validate against the DTD that is declared
XHTML 1.1 is made up of three primary parts:
- The XHTML 1.0 Strict DTD (with minor modifications)
- XHTML Modularization
- The Ruby Annotation
If you’d like to author documents in XHTML 1.1, you can do so in a couple of ways. The first is by using the public XHTML 1.1 DTD. By doing this, your work will be extremely structured because there are virtually no presentational attributes in XHTML 1.1. The separation of structure and presentation is complete here, and all of your presentation work will go in a style sheet.
Another means of authoring documents in XHTML 1.1 is to tap into XHTML Modularization. This is the breakdown of familiar components of HTML and XHTML (such as text, tables, frames, forms) into discrete chunks. You can then write your own DTD and use only those components you require. This is extensibility in action, essentially giving you, the web author, the opportunity to customize your markup. | |